-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Lint/NonLocalExitFromIterator false positive #3855
Labels
Comments
Nice find @zachlatta! I think the reason we've missed this is that it's a pretty uncommon (at least to me) edge case. But there's no reason why we couldn't account for this, that I can see. 😀 |
Yeah, that should be easy to fix. |
Drenmi
added a commit
to Drenmi/rubocop
that referenced
this issue
Jan 21, 2017
…method definitions This cop would report an offense if it found a `return` statement inside a method definition inside a block, even though the `return` is scoped to the method definition. This change fixes that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I'm get a false positive from
Lint/NonLocalExitFromIterator
in the below code:Expected behavior
No flags should be raised.
Actual behavior
It's flagged with:
Curiously, this only seems to happen when there's a block argument specified in the
VCR.configure
block – try omitting|c|
to see what I mean.Steps to reproduce the problem
RuboCop version
Include the output of
rubocop -V
. Here's an example:The text was updated successfully, but these errors were encountered: