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

Syntax Error on nested hash that parses with MRI 2.0 but not with JRuby 9000 #3015

Closed
Overbryd opened this Issue Jun 3, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@Overbryd

Overbryd commented Jun 3, 2015

Condensed example:

$ ruby -v
jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]

$ ruby -ce '{ "foo.foo": { zig: "zag" } }'                                                                 
SyntaxError in -e:1: syntax error, unexpected tLCURLY
{ "foo.foo": { zig: "zag" } }

Same works on MRI

$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]

$ ruby -ce '{ "foo.foo": { zig: "zag" } }'
Syntax OK

Interestingly not nesting a hash works:

$ ruby -v
jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]

$ ruby -ce '{ "foo.foo": "bar" }'                                                                 
Syntax OK

@enebo enebo added this to the JRuby 9.0.0.0 milestone Jun 3, 2015

@enebo enebo added the parser label Jun 3, 2015

@enebo enebo closed this in e810614 Jun 4, 2015

@enebo enebo modified the milestones: JRuby 9.0.0.0.rc2, JRuby 9.0.0.0 Jul 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment