Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre2
-
Fix Version/s: JRuby 1.7.0.RC1
-
Component/s: Parser
-
Labels:None
-
Environment:Mac 10.7.4 with rvm 1.15.5
-
Number of attachments :
Description
There seems to be a parsing bug in JRuby when the first line of a Ruby file is very long (~8000 characters or more). I created a gist with an example file here: https://gist.github.com/3497860 The first line creates a long array of hashes. Depending on how long the first line is or what the subsequent line is I'll see different errors such as SyntaxErrors or NameErrors. I saw on my system when the second line was very short the program would complete without any errors or output. This all seems to be related to a parse problem. If you remove one hash from the array then it parses correctly. I tried a few variants of the file on MRI and I couldn't reproduce the problem there.
Fun! Reproduced here.