diff options
| -rw-r--r-- | test/ruby/test_gc_compact.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index d53e61d252..8272a3fff3 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -323,7 +323,7 @@ class TestGCCompact < Test::Unit::TestCase end stats = GC.verify_compaction_references(expand_heap: true, toward: :empty) - assert_operator(stats.dig(:moved_down, :T_ARRAY), :>=, ARY_COUNT) + assert_operator(stats.dig(:moved_down, :T_ARRAY) || 0, :>=, ARY_COUNT) assert(arys) # warning: assigned but unused variable - arys end; end @@ -345,7 +345,7 @@ class TestGCCompact < Test::Unit::TestCase end stats = GC.verify_compaction_references(expand_heap: true, toward: :empty) - assert_operator(stats.dig(:moved_up, :T_ARRAY), :>=, ARY_COUNT) + assert_operator(stats.dig(:moved_up, :T_ARRAY) || 0, :>=, ARY_COUNT) assert(arys) # warning: assigned but unused variable - arys end; end @@ -375,7 +375,7 @@ class TestGCCompact < Test::Unit::TestCase stats = GC.verify_compaction_references(expand_heap: true, toward: :empty) - assert_operator(stats[:moved_up][:T_OBJECT], :>=, OBJ_COUNT) + assert_operator(stats.dig(:moved_up, :T_OBJECT) || 0, :>=, OBJ_COUNT) end; end |
