1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Ruby 1.9.2: explicit coercion check no longer needed; bug fixed upstream

This commit is contained in:
Jeremy Kemper 2010-01-01 11:02:09 -08:00
parent b35873a575
commit 4f590b67b7

View file

@ -235,10 +235,6 @@ module ActiveModel
# It's also possible to instantiate related objects, so a Client class belonging to the clients # It's also possible to instantiate related objects, so a Client class belonging to the clients
# table with a +master_id+ foreign key can instantiate master through Client#master. # table with a +master_id+ foreign key can instantiate master through Client#master.
def method_missing(method_id, *args, &block) def method_missing(method_id, *args, &block)
if method_id == :to_ary || method_id == :to_str
raise NoMethodError, "undefined method `#{method_id}' for #{inspect}:#{self.class}"
end
method_name = method_id.to_s method_name = method_id.to_s
if match = match_attribute_method?(method_name) if match = match_attribute_method?(method_name)
guard_private_attribute_method!(method_name, args) guard_private_attribute_method!(method_name, args)