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

Parser fails on `assert_equal(true, (not ()))` expresion #3245

Closed
pitr-ch opened this Issue Aug 11, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@pitr-ch
Copy link
Member

commented Aug 11, 2015

I am getting a NullPointerException /Users/pitr/Workspace/labs/jruby/test/mri/lib/test/unit.rb:257:inrequire': internal implementation error - NullPointerException null org.jruby.parser.ParserSupport.cond0(ParserSupport.java:544) (RubyTruffleError)`.

I've tracked it down to this expression assert_equal(true, (not ())) in test/mri/ruby/test_not.rb. Could you look at it?

@pitr-ch pitr-ch added the parser label Aug 11, 2015

@enebo enebo closed this in 48ad16e Aug 11, 2015

@enebo enebo added this to the JRuby 9.0.1.0 milestone Aug 11, 2015

@enebo

This comment has been minimized.

Copy link
Member

commented Aug 11, 2015

I solved this differently than MRI which was adding lots of null checks by returning () as nil. I think this should be safe if you consider '()' in other non-parameter contexts like:

p () #=> "nil"
@pitr-ch

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2015

@enebo Thanks for quick fix. Reenabling in truffle MRI tests too.

@enebo

This comment has been minimized.

Copy link
Member

commented Aug 11, 2015

@pitr-ch cool. If you find more (as we have tons of tests commented out) then open up issues. I should be able to fix parsing issues quick. This '()' has been one which seems to never completely go away...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.