diff options
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/array.c b/src/array.c index 6ec20d673..37f1474df 100644 --- a/src/array.c +++ b/src/array.c @@ -177,10 +177,7 @@ mrb_ary_concat_m(mrb_state *mrb, mrb_value self) { mrb_value other; - mrb_get_args(mrb, "o", &other); - if (mrb_type(other) != MRB_TT_ARRAY) { - mrb_raise(mrb, E_ARGUMENT_ERROR, "expected Array"); - } + mrb_get_args(mrb, "A", &other); mrb_ary_concat(mrb, self, other); return self; } @@ -193,11 +190,7 @@ mrb_ary_plus(mrb_state *mrb, mrb_value self) mrb_value other; mrb_value ary; - mrb_get_args(mrb, "o", &other); - if (mrb_type(other) != MRB_TT_ARRAY) { - mrb_raise(mrb, E_ARGUMENT_ERROR, "expected Array"); - } - + mrb_get_args(mrb, "A", &other); ary = mrb_ary_new_capa(mrb, a1->len + RARRAY_LEN(other)); a2 = mrb_ary_ptr(ary); memcpy(a2->buf, a1->buf, sizeof(mrb_value)*a1->len); |
