Commit 5267c97
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.Kernel.suppress(Exception)
1 parent 86bffd4 commit 5267c97
1 file changed
+21
-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 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
1771 | 1792 | | |
1772 | 1793 | | |
1773 | 1794 | | |
| |||
0 commit comments