Commit 438bbf5
committed
Avoid
ref: rubocop/rubocop-rails#1547
Using `Kernel.suppress(Exception) { ?? }` is effectively equivalent to:
```ruby
begin
??
rescue Exception
end
```
Since rescuing `Exception` directly is discouraged by `Lint/RescueException`,
it makes sense to discourage this usage as well.
See https://rubystyle.guide/#no-blind-rescuesKernel.suppress(Exception)
1 parent 86bffd4 commit 438bbf5
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1768 | 1768 | | |
1769 | 1769 | | |
1770 | 1770 | | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1771 | 1788 | | |
1772 | 1789 | | |
1773 | 1790 | | |
| |||
0 commit comments