mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 14:05:02 +02:00
parent
4fbfc116ca
commit
b90c48b1e2
1 changed files with 3 additions and 0 deletions
|
@ -262,6 +262,9 @@ class TestGc < Test::Unit::TestCase
|
||||||
objects.append(100.times.map { '*' })
|
objects.append(100.times.map { '*' })
|
||||||
end
|
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)
|
need_major_by = GC.latest_gc_info(:need_major_by)
|
||||||
GC.start(full_mark: false) # should be upgraded to major
|
GC.start(full_mark: false) # should be upgraded to major
|
||||||
major_by = GC.latest_gc_info(:major_by)
|
major_by = GC.latest_gc_info(:major_by)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue