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
Closed

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

pitr-ch opened this issue Aug 11, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@pitr-ch
Copy link
Member

pitr-ch 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 as completed in 48ad16e Aug 11, 2015
@enebo enebo added this to the JRuby 9.0.1.0 milestone Aug 11, 2015
@enebo
Copy link
Member

enebo 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
Copy link
Member Author

pitr-ch commented Aug 11, 2015

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

@enebo
Copy link
Member

enebo 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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants