From 02705b27be207fce57bd0253251f81108c7ed57b Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 4 Mar 2020 11:33:55 +0900 Subject: Run major GC to make sure the minor GC reason GC.latest_gc_info[:major_by] can return `oldmalloc` because of last GC status. --- test/ruby/test_gc.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_gc.rb') diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 401af99f3b..a2ccc63218 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -145,6 +145,7 @@ class TestGc < Test::Unit::TestCase assert_equal :newobj, GC.latest_gc_info[:gc_by] eom + GC.start GC.start assert_equal :force, GC.latest_gc_info[:major_by] if use_rgengc? assert_equal :method, GC.latest_gc_info[:gc_by] -- cgit v1.2.3