提交 89eb1ae6 编写于 作者: S Santiago Pastorino

Merge pull request #18562 from vipulnsward/fix-broken-hwai-frozen-tet

Fix hwia isolated tests
......@@ -1549,6 +1549,14 @@ def test_should_return_dup_for_with_indifferent_access
assert_not_same hash_wia, hash_wia.with_indifferent_access
end
def test_allows_setting_frozen_array_values_with_indifferent_access
value = [1, 2, 3].freeze
hash = HashWithIndifferentAccess.new
hash[:key] = value
assert_equal hash[:key], value
end
def test_should_copy_the_default_value_when_converting_to_hash_with_indifferent_access
hash = Hash.new(3)
hash_wia = hash.with_indifferent_access
......
......@@ -8,10 +8,4 @@ def test_reverse_merge
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
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册