diff options
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/array.c b/src/array.c index 37f1474df..7b486430f 100644 --- a/src/array.c +++ b/src/array.c @@ -917,22 +917,10 @@ mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep) static mrb_value mrb_ary_join_m(mrb_state *mrb, mrb_value ary) { - mrb_value *argv; - int argc; - - mrb_get_args(mrb, "*", &argv, &argc); - switch(argc) { - case 0: - return mrb_ary_join(mrb, ary, mrb_nil_value()); - - case 1: - return mrb_ary_join(mrb, ary, argv[0]); - - default: - mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments"); - } + mrb_value sep = mrb_nil_value(); - return mrb_nil_value(); /* dummy */ + mrb_get_args(mrb, "|o", &sep); + return mrb_ary_join(mrb, ary, sep); } static mrb_value |
