-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error for
Style/IfWithSemicolon
This PR fixes the following error for `Style/IfWithSemicolon` when when using nested single-line if/;/end in block of if/else branches. ```console $ cat /tmpp/example.rb if foo?;bar;else baz do if qux;else quux;end;end;end $ bundle exec rubocop --only Style/IfWithSemicolon /tmp/example.rb -a -d (snip) An error occurred while Style/IfWithSemicolon cop was inspecting /tmp/example.rb:1:24. Parser::Source::TreeRewriter detected clobbering /Users/koic/.rbenv/versions/3.4-dev/lib/ruby/gems/3.4.0+0/gems/parser-3.3.4.2/lib/parser/source/tree_rewriter.rb:427 :in 'Parser::Source::TreeRewriter#trigger_policy' ```
- Loading branch information
Showing
3 changed files
with
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#13191](https://github.com/rubocop/rubocop/pull/13191): Fix an error for `Style/IfWithSemicolon` when using nested single-line if/;/end in block of if/else branches. ([@koic][]) |
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