提交 fb3ea8b8 编写于 作者: D David Lee

Use dup to preserve previous behavior

上级 0a070a24
......@@ -11,7 +11,7 @@ def extractable_options?
end
def with_indifferent_access
self
dup
end
def initialize(constructor = {})
......
......@@ -971,7 +971,7 @@ def test_should_nil_if_no_default_value_is_supplied
assert_nil hash_wia.default
end
def test_should_return_self_for_with_indifferent_access
def test_should_return_dup_for_with_indifferent_access
hash_wia = HashWithIndifferentAccess.new
assert_equal hash_wia, hash_wia.with_indifferent_access
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册