Permalink
Browse files

Rescue handlers should never need array wrapping. Bug if so.

  • Loading branch information...
1 parent bd51790 commit 0214d337b3b3301f4e1478248b386d43ca6c15e0 @jeremy jeremy committed Nov 13, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 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 @@ def rescue_with_handler(exception)
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.

0 comments on commit 0214d33

Please sign in to comment.