From 3cae21f2309f45e59dd361509d41e20a1e1c7731 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Fri, 30 Apr 2010 15:38:53 -0400 Subject: [PATCH] Prevent calling regexp on symbol in Ruby 1.9 in association_proxy --- .../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 b9d0fe3..e88618d 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 -- 1.6.4.4