use "S!" specifier of mrb_get_args() to improve #2882 fix.

parent 02474daa
...@@ -1031,11 +1031,7 @@ mrb_ary_join_m(mrb_state *mrb, mrb_value ary) ...@@ -1031,11 +1031,7 @@ mrb_ary_join_m(mrb_state *mrb, mrb_value ary)
{ {
mrb_value sep = mrb_nil_value(); mrb_value sep = mrb_nil_value();
mrb_get_args(mrb, "|o", &sep); mrb_get_args(mrb, "|S!", &sep);
if (!(mrb_nil_p(sep) || mrb_type(sep) == MRB_TT_STRING)) {
mrb_raise(mrb, E_TYPE_ERROR, "expected String");
return mrb_nil_value();
}
return mrb_ary_join(mrb, ary, sep); return mrb_ary_join(mrb, ary, sep);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment