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.
…nested `if` See rubocop#4491. Reproduce ====== ```ruby if cond if cond2 some else end end ``` ```bash $ rubocop -a --only EmptyElse Inspecting 1 file E Offenses: test.rb:4:3: C: [Corrected] Redundant else-clause. else ^^^^ test.rb:5:1: E: unexpected token $end (Using Ruby 2.1 parser; configure using TargetRubyVersion parameter, under AllCops) 1 file inspected, 2 offenses detected, 1 offense corrected $ cat test.rb if cond if cond2 some end ``` This change fixes the bug.
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 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