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

This commit is contained in:
Jeremy Kemper 2009-11-13 11:00:18 -08:00
parent bd51790895
commit 0214d337b3
1 changed files with 1 additions and 2 deletions

View File

@ -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.