Permalink
Browse files

Use dup to preserve previous behavior

  • Loading branch information...
1 parent 0a070a2 commit fb3ea8b8cb324d174e801d27dc15315b9358486f @dlee dlee committed May 17, 2011
@@ -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

0 comments on commit fb3ea8b

Please sign in to comment.