forked from rubocop/rubocop
-
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.
…d conditionals When inspecting and auto-correcting code with nested conditionals where the inner conditional has an `else` statement, but the outer conditional does not, the auto-correct messes up: ``` foos.each do |foo| unless foo[:bar] if baz do_something else do_something_else end end end ``` was corrected to: ``` foos.each do |foo| unless foo[bar] next unless baz do_something else do_something_else end end ``` This change fixes that.
- Loading branch information
Showing
3 changed files
with
29 additions
and
2 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
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
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