-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix false positive by Lint/UselessAssignment.
This code would wrongly produce a UselessAssignment on "myvar=0" ``` def useless_assignment_bug myvar = 0 if cond myvar = nil # 'myvar = 1' makes the bug go away bar if baz # 'bar' kills the bug end myvar end ``` because on_if did not return `node` and therefore this cop managed to confuse another cop.
- Loading branch information
Showing
1 changed file
with
15 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters