We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
non-local exit from iterator without return value
[:method_one, :method_two].each do |method_name| define_method(method_name) do return if predicate? end end
is flagged with:
Non-local exit from iterator, without return value. next, break, Array#find, Array#any?, etc. is preferred.
rubocop -V 0.34.2 (using Parser 2.2.2.6, running on ruby 2.2.2 x86_64-darwin14) (and current master)
The text was updated successfully, but these errors were encountered:
Just opening a PR which fixes this.
Sorry, something went wrong.
9fbaadd
Merge pull request #2365 from alexdowad/define_method_return
2139974
[Fix #2272] `Lint/NonLocalExitFromIterator` doesn't warn about block passed to `Module#define_method`
No branches or pull requests
is flagged with:
The text was updated successfully, but these errors were encountered: