From 3d6eafe32ed498784dba2b9782bbf7df47ebeb6b Mon Sep 17 00:00:00 2001 From: Miles Georgi Date: Sun, 11 Dec 2011 12:59:59 -0800 Subject: Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccess to return self. --- activesupport/test/core_ext/hash_ext_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activesupport/test/core_ext/hash_ext_test.rb') 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 -- cgit v1.2.3