diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-07-12 09:29:54 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-07-12 09:29:54 -0400 |
| commit | b90c48b1e20b955da99dfa954a33bb504a5f90f8 (patch) | |
| tree | 1e70f58103a57e0a0aa689524799657adceebdd8 /test | |
| parent | 4fbfc116ca375ba8ae3747fcf32fdb85c48683c9 (diff) | |
Add comment to test
Add comment for 7299c8c0f165247853fac2fe337e7c2678e653c9.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_gc.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 7650c68eca..640c5c6340 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -262,6 +262,9 @@ class TestGc < Test::Unit::TestCase objects.append(100.times.map { '*' }) end + # We need to ensure that no GC gets ran before the call to GC.start since + # it would trigger a major GC. Assertions could allocate objects and + # trigger a GC so we don't run assertions until we perform the major GC. need_major_by = GC.latest_gc_info(:need_major_by) GC.start(full_mark: false) # should be upgraded to major major_by = GC.latest_gc_info(:major_by) |
