Skip to content

Commit

Permalink
Should terminate nested iterations in each_object; ref #3359
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 25, 2017
1 parent 058da1f commit 03cdb8e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 03cdb8e

Please sign in to comment.