Call mrb_full_gc before gc_each_objects; ref #3782

Otherwise dead object may be seen from `#each_object`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-19 11:38:11 +09:00
parent 9146d5c34f
commit 2294ebdd44
+1
View File
@@ -1483,6 +1483,7 @@ gc_each_objects(mrb_state *mrb, mrb_gc *gc, mrb_each_object_callback *callback,
{
mrb_heap_page* page;
mrb_full_gc(mrb);
page = gc->heaps;
while (page != NULL) {
RVALUE *p;