Fix GC mark leaks for `MRB_TT_BREAK`; fix
@@ -760,6 +760,14 @@ gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
mrb_gc_mark_range(mrb, (struct RRange*)obj);
break;
+ case MRB_TT_BREAK:
+ {
+ struct RBreak *brk = (struct RBreak*)obj;
+ mrb_gc_mark(mrb, (struct RBasic*)mrb_break_proc_get(brk));
+ mrb_gc_mark_value(mrb, mrb_break_value_get(brk));
+ }
+ break;
+
default:
break;
}
@@ -1019,6 +1027,7 @@ gc_gray_counts(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
case MRB_TT_PROC:
case MRB_TT_RANGE:
+ case MRB_TT_BREAK:
children+=2;
break;
