提交 6ae3a4e5 编写于 作者: A Aaron Patterson

Merge pull request #12632 from al2o3cr/fix_race_for_attribute_methods

Always check to see if methods exist after calling define_attribute_methods
......@@ -161,12 +161,9 @@ def attribute_names
# If we haven't generated any methods yet, generate them, then
# see if we've created the method we're looking for.
def method_missing(method, *args, &block) # :nodoc:
if self.class.define_attribute_methods
if respond_to_without_attributes?(method)
send(method, *args, &block)
else
super
end
self.class.define_attribute_methods
if respond_to_without_attributes?(method)
send(method, *args, &block)
else
super
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册