aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/class
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-17 00:53:48 -0700
committerwycats <wycats@gmail.com>2010-03-17 00:53:48 -0700
commit640ee5b68d1078fc164bd4e10c019f284ad9b760 (patch)
treec0216c11cc577d93393939c343785189a71cd0c1 /activesupport/lib/active_support/core_ext/class
parenta5587efc1903fd27d4b179753aa6e139445ad18c (diff)
downloadrails-640ee5b68d1078fc164bd4e10c019f284ad9b760.tar.gz
rails-640ee5b68d1078fc164bd4e10c019f284ad9b760.tar.bz2
rails-640ee5b68d1078fc164bd4e10c019f284ad9b760.zip
Fix some more warnings on 1.9
Diffstat (limited to 'activesupport/lib/active_support/core_ext/class')
-rw-r--r--activesupport/lib/active_support/core_ext/class/delegating_attributes.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
index b5785bdcd3..df4954e67a 100644
--- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
@@ -27,7 +27,9 @@ private
# inheritance behavior, without having to store the object in an instance
# variable and look up the superclass chain manually.
def _stash_object_in_method(object, method, instance_reader = true)
+ singleton_class.send(:remove_possible_method, method)
singleton_class.send(:define_method, method) { object }
+ remove_possible_method(method)
define_method(method) { object } if instance_reader
end