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

Miscellaneous parsing fixes #4911

merged 8 commits into from Dec 22, 2017

Miscellaneous parsing fixes #4911

merged 8 commits into from Dec 22, 2017


Copy link

@grddev 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.

The recent fixes ensured that the on_assign_error callback was issued, but MRI fails the whole parse in this case.
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.
So that Ripper can also benefit from it.
The parser correctly identified that no interpolation should happen, but failed to include the hash symbol in the result.
For both the main Ruby parser and Ripper
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants