Permalink
Browse files

Prevent calling regexp on symbol in Ruby 1.9 in association_proxy

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 743d77f commit 5be49884b5947d4624bdaaf9cf2629ca4dd73567 @ernie ernie committed with lifo Apr 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/association_proxy.rb
@@ -51,7 +51,7 @@ class AssociationProxy #:nodoc:
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

0 comments on commit 5be4988

Please sign in to comment.