diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-01 11:41:16 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-01 11:41:16 +0100 |
commit | 66615f25cf30835968f5c4798c5befea0d357e89 (patch) | |
tree | e364f1340b605b861c688384914518e4964f8d17 /activesupport/lib/active_support/rescuable.rb | |
parent | 0dece7929cf5b04f008640936fb3ece24ce80daa (diff) | |
parent | e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 (diff) | |
download | rails-66615f25cf30835968f5c4798c5befea0d357e89.tar.gz rails-66615f25cf30835968f5c4798c5befea0d357e89.tar.bz2 rails-66615f25cf30835968f5c4798c5befea0d357e89.zip |
Merge branch 'master' of gitproxy:rails/rails
Diffstat (limited to 'activesupport/lib/active_support/rescuable.rb')
-rw-r--r-- | activesupport/lib/active_support/rescuable.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb index 6e660f8647..e4c1651acf 100644 --- a/activesupport/lib/active_support/rescuable.rb +++ b/activesupport/lib/active_support/rescuable.rb @@ -1,4 +1,4 @@ -require 'active_support/core_ext/class/inheritable_attributes' +require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/proc' require 'active_support/core_ext/string/inflections' require 'active_support/core_ext/array/extract_options' @@ -9,7 +9,7 @@ module ActiveSupport extend Concern included do - class_inheritable_accessor :rescue_handlers + class_attribute :rescue_handlers self.rescue_handlers = [] end @@ -67,7 +67,7 @@ module ActiveSupport end # put the new handler at the end because the list is read in reverse - rescue_handlers << [key, options[:with]] + self.rescue_handlers += [[key, options[:with]]] end end end @@ -83,7 +83,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 = rescue_handlers.reverse.detect do |klass_name, handler| + _, rescuer = self.class.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. |