diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-01-16 21:56:26 +0000 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-01-16 21:56:26 +0000 |
commit | 0d019afcd538b9ecd425471b6db6d624e12897b3 (patch) | |
tree | 10dfef0c58891689370d625d1caaed7cf0c5cac6 /activesupport/test | |
parent | 23a80015a5e6b8a647344f44c62670b5fe02f521 (diff) | |
parent | 584931d749bfdd8553740bdcc6e4fef2c18ec523 (diff) | |
download | rails-0d019afcd538b9ecd425471b6db6d624e12897b3.tar.gz rails-0d019afcd538b9ecd425471b6db6d624e12897b3.tar.bz2 rails-0d019afcd538b9ecd425471b6db6d624e12897b3.zip |
Merge pull request #18551 from aditya-kapoor/fix-frozen-hwia
Fix assignment for frozen value in HWIA
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/hash_with_indifferent_access_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/hash_with_indifferent_access_test.rb b/activesupport/test/hash_with_indifferent_access_test.rb index 843994147b..880457386e 100644 --- a/activesupport/test/hash_with_indifferent_access_test.rb +++ b/activesupport/test/hash_with_indifferent_access_test.rb @@ -7,4 +7,11 @@ class HashWithIndifferentAccessTest < ActiveSupport::TestCase hash.reverse_merge! key: :new_value assert_equal :old_value, hash[:key] end + + def test_frozen_value + value = [1, 2, 3].freeze + hash = {}.with_indifferent_access + hash[:key] = value + assert_equal hash[:key], value + end end
\ No newline at end of file |