зеркало из https://github.com/github/ruby.git
Fix test_gc_parameter_init_slots
If the stack is not cleared (e.g. compiling with -O0), then `ary` could remain on the stack, which would be marked. Clear the array first to make sure all the objects can be GC'd.
This commit is contained in:
Родитель
8b390a456c
Коммит
36d669b73d
|
@ -438,6 +438,7 @@ class TestGc < Test::Unit::TestCase
|
|||
while GC.stat_heap(0, :heap_allocatable_pages) != 0
|
||||
ary << Object.new
|
||||
end
|
||||
ary.clear
|
||||
ary = nil
|
||||
|
||||
# Clear all the objects that were allocated.
|
||||
|
|
Загрузка…
Ссылка в новой задаче