I have a model class class Foo < ActiveRecord::Base attr_protected :bar end
I would think that Foo.new.respond_to?(:bar) would be false, but it returns true. This is because the definition of :respond_to? checks whether @attributes.include?(method_name), but doesn't take attribute protection into account. Foo thus does not abide by the general contract of respond_to?: "respond_to?(:baz) returns true if and only if call(:baz) does not raise a NoMethodError." Will fixing this break tons and tons of code? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
