diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_hash.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 1e1b37f981..b6c18ea958 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1986,9 +1986,12 @@ class TestHashOnly < Test::Unit::TestCase ObjectSpace.count_objects h = {"abc" => 1} - before = ObjectSpace.count_objects[:T_STRING] - 5.times{ h["abc"] } - assert_equal before, ObjectSpace.count_objects[:T_STRING] + + EnvUtil.without_gc do + before = ObjectSpace.count_objects[:T_STRING] + 5.times{ h["abc"] } + assert_equal before, ObjectSpace.count_objects[:T_STRING] + end end def test_AREF_fstring_key_default_proc |
