Skip `mrb_get_args()` in `mrb_ary_push()`.
MODIFY
src/array.c
src/array.c
@@ -508,19 +508,21 @@ mrb_ary_push(mrb_state *mrb, mrb_value ary, mrb_value elem)
static mrb_value
mrb_ary_push_m(mrb_state *mrb, mrb_value self)
{
+ mrb_int argc;
mrb_value *argv;
- mrb_int len, len2, alen;
+ mrb_int len, len2;
struct RArray *a;
- mrb_get_args(mrb, "*!", &argv, &alen);
+ argc = mrb_get_argc(mrb);
+ argv = mrb_get_argv(mrb);
a = mrb_ary_ptr(self);
ary_modify(mrb, a);
len = ARY_LEN(a);
- len2 = len + alen;
+ len2 = len + argc;
if (ARY_CAPA(a) < len2) {
ary_expand_capa(mrb, a, len2);
}
- array_copy(ARY_PTR(a)+len, argv, alen);
+ array_copy(ARY_PTR(a)+len, argv, argc);
ARY_SET_LEN(a, len2);
while (alen--) {
mrb_field_write_barrier_value(mrb, (struct RBasic*)a, *argv);

Skip `mrb_get_args()` in `mrb_ary_push()`.