diff options
Diffstat (limited to 'test/ruby/test_hash.rb')
| -rw-r--r-- | test/ruby/test_hash.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 576a5f6064..2d1b513c70 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -465,10 +465,10 @@ class TestHash < Test::Unit::TestCase def test_each_value res = [] @cls[].each_value { |v| res << v } - assert_equal(0, [].length) + assert_equal(0, res.length) @h.each_value { |v| res << v } - assert_equal(0, [].length) + assert_equal(@h.size, res.length) expected = [] @h.each { |k, v| expected << v } @@ -2007,7 +2007,7 @@ class TestHashOnly < Test::Unit::TestCase EnvUtil.without_gc do before = ObjectSpace.count_objects[:T_STRING] - 5.times{ h["abc"] } + 5.times{ h["abc".freeze] } assert_equal before, ObjectSpace.count_objects[:T_STRING] end end |
