aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorCarl Lerche & Yehuda Katz <wycats@gmail.com>2009-04-13 16:56:04 -0700
committerCarl Lerche & Yehuda Katz <wycats@gmail.com>2009-04-13 16:56:04 -0700
commit647b83d50cba655422bcb83815f618b5a92bfc7d (patch)
tree72ea7eaf5344a19161c59812707b3055d98adfbe /activesupport
parent906aebceedb95d8caa6db6314bc90f605bdfaf2b (diff)
downloadrails-647b83d50cba655422bcb83815f618b5a92bfc7d.tar.gz
rails-647b83d50cba655422bcb83815f618b5a92bfc7d.tar.bz2
rails-647b83d50cba655422bcb83815f618b5a92bfc7d.zip
Resurrecting 1.9 compatibility.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/concurrent_hash.rb1
-rw-r--r--activesupport/lib/active_support/new_callbacks.rb3
-rw-r--r--activesupport/lib/active_support/testing/pending.rb2
-rw-r--r--activesupport/test/memoizable_test.rb2
4 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/concurrent_hash.rb b/activesupport/lib/active_support/concurrent_hash.rb
index c9f9b16da3..40224765a7 100644
--- a/activesupport/lib/active_support/concurrent_hash.rb
+++ b/activesupport/lib/active_support/concurrent_hash.rb
@@ -9,6 +9,7 @@ module ActiveSupport
def []=(k,v)
@mutex.synchronize { @backup_cache[k] = v }
@frozen_cache = @backup_cache.dup.freeze
+ v
end
def [](k)
diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb
index b93057fe27..2ac5339f07 100644
--- a/activesupport/lib/active_support/new_callbacks.rb
+++ b/activesupport/lib/active_support/new_callbacks.rb
@@ -368,7 +368,8 @@ module ActiveSupport
end
RUBY_EVAL
- class_eval str, __FILE__, __LINE__ + 1
+ undef_method "_run_#{symbol}_callbacks" if method_defined?("_run_#{symbol}_callbacks")
+ class_eval str, __FILE__, __LINE__
before_name, around_name, after_name =
options.values_at(:before, :after, :around)
diff --git a/activesupport/lib/active_support/testing/pending.rb b/activesupport/lib/active_support/testing/pending.rb
index b6905ddccd..d945c7e476 100644
--- a/activesupport/lib/active_support/testing/pending.rb
+++ b/activesupport/lib/active_support/testing/pending.rb
@@ -16,7 +16,7 @@ module ActiveSupport
begin
block.call
- rescue
+ rescue Exception
failed = true
end
diff --git a/activesupport/test/memoizable_test.rb b/activesupport/test/memoizable_test.rb
index b03178900f..214e243aa5 100644
--- a/activesupport/test/memoizable_test.rb
+++ b/activesupport/test/memoizable_test.rb
@@ -1,6 +1,6 @@
require 'abstract_unit'
-class MemoizableTest < Test::Unit::TestCase
+class MemoizableTest < ActiveSupport::TestCase
class Person
extend ActiveSupport::Memoizable