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

Cop idea: Disallow having yield in a lambda #12864

Open
boris-petrov opened this issue Apr 24, 2024 · 0 comments
Open

Cop idea: Disallow having yield in a lambda #12864

boris-petrov opened this issue Apr 24, 2024 · 0 comments

Comments

@boris-petrov
Copy link

Is your feature request related to a problem? Please describe.

Ruby disallows that and blows up with a syntax error. At least JRuby does that. Not sure what MRI does.

I was surprised to see that RuboCop passes with a file containing that.

Describe the solution you'd like

A cop that flags that as an error.

Describe alternatives you've considered

None.

Additional context

Stack Overflow thread.

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

No branches or pull requests

1 participant