Skip to content

Commit

Permalink
Use dup to preserve previous behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dlee committed May 17, 2011
1 parent 0a070a2 commit fb3ea8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def extractable_options?
end

def with_indifferent_access
self
dup
end

def initialize(constructor = {})
Expand Down
2 changes: 1 addition & 1 deletion activesupport/test/core_ext/hash_ext_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb3ea8b

Please sign in to comment.