summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-03-04 11:31:07 +0900
committerKoichi Sasada <ko1@atdot.net>2020-03-04 11:31:07 +0900
commit6e271e4cbbe6a8bc4d4f75dc553ce054eae7af00 (patch)
treed89d123c42e660c4f1f2a97cabb27b287c5879c3 /test/ruby
parentcf52f37caec8cd1955af4ccb32933828aa330854 (diff)
Run major GC to make sure the minor GC next time.
`GC.start(full_mark: false)` can run full GC because of last GC status. Just after major GC, the possibility to run major GC next time is too small (not a zero, but too small possibility).
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 77f5d8caaa..401af99f3b 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -56,8 +56,9 @@ class TestGc < Test::Unit::TestCase
return unless use_rgengc?
skip 'stress' if GC.stress
+ GC.start # full mark and next time it should be minor mark
GC.start(full_mark: false)
- assert_nil GC.latest_gc_info(:major_by)
+ assert_nil GC.latest_gc_info(:major_by, msg)
GC.start(full_mark: true)
assert_not_nil GC.latest_gc_info(:major_by)