aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/lib/active_support/core_ext/kernel/reporting.rb1
-rw-r--r--activesupport/test/core_ext/kernel_test.rb9
2 files changed, 0 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel/reporting.rb b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
index 9e50ea23b7..d0197af95f 100644
--- a/activesupport/lib/active_support/core_ext/kernel/reporting.rb
+++ b/activesupport/lib/active_support/core_ext/kernel/reporting.rb
@@ -37,7 +37,6 @@ module Kernel
#
# puts 'This code gets executed and nothing related to ZeroDivisionError was seen'
def suppress(*exception_classes)
- exception_classes = StandardError if exception_classes.empty?
yield
rescue *exception_classes
end
diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb
index bb634d6a09..503e6595cb 100644
--- a/activesupport/test/core_ext/kernel_test.rb
+++ b/activesupport/test/core_ext/kernel_test.rb
@@ -42,15 +42,6 @@ class KernelSuppressTest < ActiveSupport::TestCase
end
end
- def test_suppress_with_defaults
- suppress { raise RuntimeError }
- suppress { raise ArgumentError }
-
- assert_raise(LoadError) do
- suppress { raise LoadError }
- end
- end
-
def test_suppression
suppress(ArgumentError) { raise ArgumentError }
suppress(LoadError) { raise LoadError }