-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parser bug #1887
Comments
2.0 mode in JRuby 1.7 has always been experimental, so without community help we probably won't be fixing 2.0 issues. Try out master...it is not optimized yet but should support full 2.1 syntax. |
I don't have other 1.9 rubies on hands at the moment, but I believe this should be a valid syntax on 1.9, too, and JRuby 1.9 mode also has this issue. I would try master, but it failed to build a few hours I tried. I would try again. |
Confirmed.
|
OK sure! Now that's something we can look into :-) |
Great. Sorry for not reporting this against master first. |
Reduced this a tiny bit more: include Module.new {
"#{b}"
d.e do
end
} This is another variant of an older bug involving the {} of Module going down a different part of the parser than MRI (I never figured out why so I hacked around it and this is exposing that the hack was not 100% soln). I think the issue is that in this other branch it is unable to handle these other constructs. It is weird that the string interpolation is needed for 'd.e do' to fail. As a workaround I believe changing {} to do or using parens around include will for until this is resolved. |
I guess the parser might enter a weird state whenever it saw a string interpolation in this case. I would try and see if I could find anything in the parser code if I have time. Using parens for calling |
Below don't compile on JRuby:
While:
Here's parser-bug.rb:
The text was updated successfully, but these errors were encountered: