Hi Rails Team,
I come from the company named NibiruTech of china ,we found a bug:
I changed as following:
/activesupport/test/core_ext/hash_ext_test.rb
def test_stringify_and_symbolize_keys_on_indifferent_preserves_hash
h = HashWithIndifferentAccess.new
h[:first] = 1
# h.stringify_keys!
assert_equal 1, hfirst?
h = HashWithIndifferentAccess.new
hfirst? = 1
# h.symbolize_keys!
assert_equal 1, h[:first]
end
when i rake test , all test be passed. in other words,your this test don't have cover the two methods : symbolize_keys! and stringify_keys!
it should be:
def test_stringify_and_symbolize_keys_on_indifferent_preserves_hash
h = HashWithIndifferentAccess.new
h[:first] = 1
h.stringify_keys!
assert_equal 1, hfirst?
h.each_key {|k| assert_not_equal k,:first}
h = HashWithIndifferentAccess.new
hfirst? = 1
h.symbolize_keys!
assert_equal 1, h[:first]
h.each_key {|k| assert_not_equal k,:first}
end
this line be added: h.each_key {|k| assert_not_equal k,:first}