summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc_compact.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_gc_compact.rb')
-rw-r--r--test/ruby/test_gc_compact.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index bae29a3162..c5fac64ca4 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -270,6 +270,9 @@ class TestGCCompact < Test::Unit::TestCase
ary = OBJ_COUNT.times.map { Foo.new }
ary.each(&:add_ivars)
+ GC.start
+ Foo.new.add_ivars
+
stats = GC.verify_compaction_references(expand_heap: true, toward: :empty)
assert_operator(stats[:moved_up][:T_OBJECT], :>=, OBJ_COUNT)