diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 811ab3edad48d8..8d315fa925196e 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -438,6 +438,7 @@ def test_gc_parameter_init_slots while GC.stat_heap(0, :heap_allocatable_pages) != 0 ary << Object.new end + ary.clear ary = nil # Clear all the objects that were allocated.