diff options
author | Ernie Miller <ernie@metautonomo.us> | 2010-04-30 15:38:53 -0400 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-05-05 18:54:07 +0100 |
commit | 5be49884b5947d4624bdaaf9cf2629ca4dd73567 (patch) | |
tree | 96cb56e68e8cbe56409e330212ef165f092d30fb /activerecord | |
parent | 743d77f405a16cd1cf1d4bbccd6b512463e10a43 (diff) | |
download | rails-5be49884b5947d4624bdaaf9cf2629ca4dd73567.tar.gz rails-5be49884b5947d4624bdaaf9cf2629ca4dd73567.tar.bz2 rails-5be49884b5947d4624bdaaf9cf2629ca4dd73567.zip |
Prevent calling regexp on symbol in Ruby 1.9 in association_proxy
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index b9d0fe3abe..e88618d278 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -51,7 +51,7 @@ module ActiveRecord alias_method :proxy_respond_to?, :respond_to? alias_method :proxy_extend, :extend delegate :to_param, :to => :proxy_target - instance_methods.each { |m| undef_method m unless m =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ } + instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ } def initialize(owner, reflection) @owner, @reflection = owner, reflection |