vm.c (OP_ENTER): need to protect kdict from GC; ref #5741

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-07-06 14:57:06 +09:00
parent 8fed80f5eb
commit b5538eded1
+1 -1
View File
@@ -2019,7 +2019,7 @@ RETRY_TRY_BLOCK:
argv = ARY_PTR(ary);
argc = (int)ARY_LEN(ary);
mrb_gc_protect(mrb, regs[1]);
if (!mrb_nil_p(kdict)) mrb_gc_protect(mrb, kdict);
if (kd && !mrb_nil_p(kdict)) mrb_gc_protect(mrb, kdict);
}
/* strict argument check */