aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-13 11:00:18 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-13 11:00:18 -0800
commit0214d337b3b3301f4e1478248b386d43ca6c15e0 (patch)
tree8b2ffbf6d82f3507ceb0a3ad0e34e6e72fbc8211 /activesupport
parentbd51790895fc75a3b4e19e8dd7aa6dc389d77068 (diff)
downloadrails-0214d337b3b3301f4e1478248b386d43ca6c15e0.tar.gz
rails-0214d337b3b3301f4e1478248b386d43ca6c15e0.tar.bz2
rails-0214d337b3b3301f4e1478248b386d43ca6c15e0.zip
Rescue handlers should never need array wrapping. Bug if so.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/rescuable.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb
index dd0752b09d..f0119f5994 100644
--- a/activesupport/lib/active_support/rescuable.rb
+++ b/activesupport/lib/active_support/rescuable.rb
@@ -1,4 +1,3 @@
-require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/class/inheritable_attributes'
require 'active_support/core_ext/proc'
@@ -82,7 +81,7 @@ module ActiveSupport
def handler_for_rescue(exception)
# We go from right to left because pairs are pushed onto rescue_handlers
# as rescue_from declarations are found.
- _, rescuer = Array.wrap(rescue_handlers).reverse.detect do |klass_name, handler|
+ _, rescuer = rescue_handlers.reverse.detect do |klass_name, handler|
# The purpose of allowing strings in rescue_from is to support the
# declaration of handler associations for exception classes whose
# definition is yet unknown.