aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorCharlie Somerville <charlie@charliesomerville.com>2013-11-13 19:34:15 -0800
committerCharlie Somerville <charlie@charliesomerville.com>2013-11-13 19:34:15 -0800
commit425f4829bd7adddedf4cfcf57173f03ee3343213 (patch)
tree4273c3766cc445210cbf7ed997fc9985eb54a815 /activesupport
parentf5ecb133335dbfcb2322e5ce91158cf91f730aea (diff)
downloadrails-425f4829bd7adddedf4cfcf57173f03ee3343213.tar.gz
rails-425f4829bd7adddedf4cfcf57173f03ee3343213.tar.bz2
rails-425f4829bd7adddedf4cfcf57173f03ee3343213.zip
Use rescue with a splat rather and catching all and filtering
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/kernel/reporting.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
index 79d3303b41..208575800e 100644
--- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb
+++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
@@ -60,8 +60,7 @@ module Kernel
# puts 'This code gets executed and nothing related to ZeroDivisionError was seen'
def suppress(*exception_classes)
yield
- rescue Exception => e
- raise unless exception_classes.any? { |cls| e.kind_of?(cls) }
+ rescue *exception_classes => e
end
# Captures the given stream and returns it: