提交 5d0c1814 编写于 作者: A Aaron Patterson

ruby 2.0 makes protected methods return false for respond_to, so pass true as the second param

上级 a2955446
......@@ -223,7 +223,7 @@ def define_attribute_method(attr_name)
unless instance_method_already_implemented?(method_name)
generate_method = "define_method_#{matcher.method_missing_target}"
if respond_to?(generate_method)
if respond_to?(generate_method, true)
send(generate_method, attr_name)
else
define_optimized_call generated_attribute_methods, method_name, matcher.method_missing_target, attr_name.to_s
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册