Should terminate nested iterations in each_object; ref #3359

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-22 22:56:04 +09:00
parent 058da1fed2
commit 03cdb8e9dd
+1 -2
View File
@@ -1499,9 +1499,8 @@ gc_each_objects(mrb_state *mrb, mrb_gc *gc, mrb_each_object_callback *callback,
pend = p + MRB_HEAP_PAGE_SIZE;
for (;p < pend; p++) {
if ((*callback)(mrb, &p->as.basic, data) == MRB_EACH_OBJ_BREAK)
break;
return;
}
page = page->next;
}
}