diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-18 15:04:37 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-18 15:04:37 -0700 |
commit | a921cab621cb6932f6e88979f7c6650d3c5952b2 (patch) | |
tree | acd850d153fe8456a6faaca9c25ff32b151cc304 /activesupport/test | |
parent | b13d24e5b96cf35cfaf64d4141216a30a7de9a33 (diff) | |
parent | 96acdfbf2a67437e8192da989caf864ba5db0b3a (diff) | |
download | rails-a921cab621cb6932f6e88979f7c6650d3c5952b2.tar.gz rails-a921cab621cb6932f6e88979f7c6650d3c5952b2.tar.bz2 rails-a921cab621cb6932f6e88979f7c6650d3c5952b2.zip |
Merge pull request #1109 from dlee/optimize_indifferent_access
Use dup to preserve previous behavior
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index b2c85f15cb..0b3f18faec 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -971,9 +971,10 @@ class HashToXmlTest < Test::Unit::TestCase 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 + assert_not_same hash_wia, hash_wia.with_indifferent_access end def test_should_copy_the_default_value_when_converting_to_hash_with_indifferent_access |