forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes rubocop#8081. This PR fixes an error for `Lint/SuppressedException` when empty rescue block in `do` block. ```console % cat example.rb foo do rescue Foo # ok end % bundle exec rubocop --only Lint/SuppressedException (snip) Inspecting 1 file W Offenses: example.rb:2:1: W: Lint/SuppressedException: Do not suppress exceptions. rescue Foo ^^^^^^^^^^ 1 file inspected, 1 offense detected ``` `do` block rescue is a syntax introduced in Ruby 2.5.
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
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