diff options
author | Miles Georgi <azimux@gmail.com> | 2011-12-11 12:59:59 -0800 |
---|---|---|
committer | Miles Georgi <azimux@gmail.com> | 2011-12-11 13:08:50 -0800 |
commit | 3d6eafe32ed498784dba2b9782bbf7df47ebeb6b (patch) | |
tree | d1b6b93a7c0f6c0260dd2e245c5670cbfe8e456d /activesupport/test/core_ext | |
parent | 6887aed31bc4f60bdc3291acd8a2a7a9bca206db (diff) | |
download | rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.tar.gz rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.tar.bz2 rails-3d6eafe32ed498784dba2b9782bbf7df47ebeb6b.zip |
Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccess
to return self.
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index fa800eada2..eb8ed761da 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -121,6 +121,9 @@ class HashExtTest < Test::Unit::TestCase foo = { "foo" => NonIndifferentHash.new.tap { |h| h["bar"] = "baz" } }.with_indifferent_access assert_kind_of NonIndifferentHash, foo["foo"] + + foo = { "foo" => IndifferentHash.new.tap { |h| h["bar"] = "baz" } }.with_indifferent_access + assert_kind_of IndifferentHash, foo["foo"] end def test_indifferent_assorted |