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

Miscellaneous parsing fixes #4911

merged 8 commits into from Dec 22, 2017


None yet
2 participants

grddev commented Dec 22, 2017

This addresses additional (beyond #4898) parsing inconsistencies between MRI and JRuby (and JRuby's main Ruby parser and Ripper parser).

The additional tests introduced did not pass in the original JRuby version(s), but did pass when running through MRI.

grddev added some commits Dec 19, 2017

Ensure assignable constant failure produces error
The recent fixes ensured that the on_assign_error callback was issued, but MRI fails the whole parse in this case.
Do not skip whitespace in percent literals
I'm not sure why this was introduced, as I don't think this was ever a thing for anything beyond w/W/i/I, and those have explicit whitespace removal in their respective cases.
Move peekVariableName to LexingCommon
So that Ripper can also benefit from it.
Ensure # is included in string with invalid gvar
The parser correctly identified that no interpolation should happen, but failed to include the hash symbol in the result.
Fix handling of invalid gvar reference in heredoc
For both the main Ruby parser and Ripper
Tweak when down next/pushback
The logic makes more sense to me, and seems to work better with the cryptic test cases this introduces.

@enebo enebo added this to the JRuby milestone Dec 22, 2017

@enebo enebo merged commit 9450508 into jruby:master Dec 22, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment