Skip to content
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 with file that has OK syntax with MRI 2.2 #2744

Closed
madis opened this issue Mar 23, 2015 · 1 comment
Closed

Syntax error with file that has OK syntax with MRI 2.2 #2744

madis opened this issue Mar 23, 2015 · 1 comment

Comments

@madis
Copy link

@madis madis commented Mar 23, 2015

The exception SyntaxError in /Users/madis/.rvm/gems/jruby-9.0.0.0.pre1/gems/hairtrigger-0.2.12/lib/hair_trigger/builder.rb:468: syntax error, unexpected tLABEL_END occured when a dependency I am using was tried to get loaded by jruby-9.0.0.0.pre. When checking with MRI 2.2.0 syntax was considered ok:

curl https://raw.githubusercontent.com/jenseng/hair_trigger/0e4c937ad9e1ed48797d1e376d241bdc61dfa140/lib/hair_trigger/builder.rb | ruby -c

Line reported to be erroneous: https://github.com/jenseng/hair_trigger/blob/0e4c937ad9e1ed48797d1e376d241bdc61dfa140/lib/hair_trigger/builder.rb#L468

@headius headius added this to the 9.0.0.0.pre2 milestone Apr 3, 2015
@headius
Copy link
Member

@headius headius commented Apr 3, 2015

A reduced case:

cond ? x + ')': ''

The parser seems to think the ')': is a hash label rather than being separate tokens ')' and ':' (for the ternary).

Parser bug for @enebo.

@enebo enebo removed this from the 9.0.0.0.pre2 milestone Apr 28, 2015
@enebo enebo added this to the 9.0.0.0.rc1 milestone Apr 28, 2015
@enebo enebo added this to the 9.0.0.0.rc1 milestone Apr 28, 2015
@enebo enebo removed this from the 9.0.0.0.pre2 milestone Apr 28, 2015
@enebo enebo closed this in 5f93f4c Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants