提交 f2e4bf21 编写于 作者: J Jeremy Kemper

Use #duplicable? instead of anonymous rescue

上级 828914a0
......@@ -128,7 +128,7 @@ def inherited_with_inheritable_attributes(child)
new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES
else
new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)|
memo.update(key => (value.dup rescue value))
memo.update(key => value.duplicable? ? value.dup : value)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册