From 843255a763c5e68beaa3a1b0bca306c625c30797 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 17 Mar 2010 10:04:49 -0700 Subject: fixing activerecord tests [#4205 state:resolved] Signed-off-by: Jeremy Kemper --- .../lib/active_support/core_ext/class/delegating_attributes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') 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 df4954e67a..9b2dc21d87 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,7 @@ 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.remove_possible_method(method) singleton_class.send(:define_method, method) { object } remove_possible_method(method) define_method(method) { object } if instance_reader @@ -37,7 +37,7 @@ private singleton_class.send(:define_method, "#{name}=") do |value| _stash_object_in_method(value, name, options[:instance_reader] != false) end - self.send("#{name}=", nil) + send("#{name}=", nil) end end -- cgit v1.2.3