vm.c: kdict may be converted to a normal argument; fix #5944

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-03-04 17:13:40 +09:00
parent 18158c96f5
commit f1ffedc3fa
+1 -1
View File
@@ -1988,7 +1988,7 @@ RETRY_TRY_BLOCK:
/* no other args */
if ((a & ~0x7c0001) == 0 && argc < 15 && MRB_PROC_STRICT_P(proc)) {
if (argc != m1) {
if (argc+(ci->nk==15) != m1) { /* count kdict too */
argnum_error(mrb, m1);
goto L_RAISE;
}