1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Run major GC to make sure the minor GC reason

GC.latest_gc_info[:major_by] can return `oldmalloc` because of
last GC status.
This commit is contained in:
Koichi Sasada 2020-03-04 11:33:55 +09:00
parent 6e271e4cbb
commit 02705b27be

View file

@ -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]