You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixesrubocop#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.
Regresion
0.85.0 introduced a regression in
Lint/SuppressedException
in blocks, 0.84.0 didn't find any offences in the example below.Expected behavior
No offense should be detected.
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: