avoid wrong ArgumentError from mrb_get_args() when surrounding method takes more than one argument; ref #2627

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-10-30 10:31:06 +09:00
parent 5bd3d9bc27
commit 378aa8a9c8
+3 -2
View File
@@ -662,9 +662,10 @@ aget_index(mrb_state *mrb, mrb_value index)
return (mrb_int)mrb_float(index);
}
else {
mrb_int i;
mrb_int i, argc;
mrb_value *argv;
mrb_get_args(mrb, "i", &i);
mrb_get_args(mrb, "i*", &i, &argv, &argc);
return i;
}
}