Skip to content

Miscellaneous parsing fixes#4911

Merged
enebo merged 8 commits intojruby:masterfrom
grddev:parsing-fixes
Dec 22, 2017
Merged

Miscellaneous parsing fixes#4911
enebo merged 8 commits intojruby:masterfrom
grddev:parsing-fixes

Conversation

@grddev
Copy link
Contributor

@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 9.2.0.0 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants