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

+ ruby34.y: reject return in singleton class #1048

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

Earlopain
Copy link
Contributor

This tracks upstream commit ruby/ruby@e642ddf

Closes #1029.

Note that in_class is now unused for 3.4 as far as I can tell. Ruby uses it in begin_definition helper but I don't think there's something equivalent with ragel here, or I just don't know about it. Kept around to keep it closer to upstream.

Tested against https://github.com/eliotsykes/real-world-rails and https://github.com/jeromedalbert/real-world-ruby-apps, got no unexpected syntax errors.

Verified

This commit was signed with the committer’s verified signature.
This tracks upstream commit ruby/ruby@e642ddf
@iliabylich iliabylich merged commit 91a0a6a into whitequark:master Dec 17, 2024
9 checks passed
@iliabylich
Copy link
Collaborator

Thanks. Can't say I like that there's a version-specific shape of the context now but I don't see a better solution (branching context would most probably only make it worse), so 👍

@Earlopain
Copy link
Contributor Author

Could try to backport this to the older parsers. But tbh that seems pretty daunting, especially when they start to deviate more and more. I think I chose a pretty easy issue to start out with otherwise, so I'm glad you didn't insist on it 😅

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.

ruby/ruby@e642ddf
2 participants