protect argument array from GC in OP_ENTER

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-05-13 16:01:30 +09:00
parent 5867167ffd
commit 4e357a4963
+1
View File
@@ -1304,6 +1304,7 @@ RETRY_TRY_BLOCK:
}
}
else if (len > 1 && argc == 1 && mrb_array_p(argv[0])) {
mrb_gc_protect(mrb, argv[0]);
argc = mrb_ary_ptr(argv[0])->len;
argv = mrb_ary_ptr(argv[0])->ptr;
}