mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
avoid wrong ArgumentError from mrb_get_args() when surrounding method takes more than one argument; ref #2627
This commit is contained in:
+3
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user