You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…kCall`
Fixesrubocop#162.
This PR fixes a false positive for `Performance/RedundantBlockCall`
when an optional block that is overridden by block variable.
When the block argument is shadowed by a nested block argument,
RedundantBlockCall
cop is triggered. Consider:The above triggers the cop. It gets wrongly auto-corrected to:
(however, regular shadowed variables are correctly handled and don't trigger the cop):
Expected behavior
Should not trigger
RedundantBlockCall
Actual behavior
Steps to reproduce the problem
Run the
false_positive
codeRuboCop version
The text was updated successfully, but these errors were encountered: