Miscellaneous parsing fixes #4911
Merged
Conversation
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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.