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
The Style/RedundantReturn cop doesn't detect offenses if an ensure block is present in a method.
ensure
Redundant returns should be flagged as an offense even if the method has an ensure block.
No offenses are detected.
The following code should trigger an offense:
class Foo def bar return nil ensure nil end end
$ rubocop -V 0.52.1
The text was updated successfully, but these errors were encountered:
This seems to be a generalization of this comment in the cop that indicates the cop should be generalized to cover a wider footprint.
Sorry, something went wrong.
Fix (this and related issues) forthcoming...
[Fix rubocop#5401] Fix to trigger when begin-end, rescue, and ensure …
eefd205
…blocks present.
4ab7e05
No branches or pull requests
The Style/RedundantReturn cop doesn't detect offenses if an
ensure
block is present in a method.Expected behavior
Redundant returns should be flagged as an offense even if the method has an
ensure
block.Actual behavior
No offenses are detected.
Steps to reproduce the problem
The following code should trigger an offense:
RuboCop version
The text was updated successfully, but these errors were encountered: