Fix `mrb_ary_splat()` to copy the array always.
@@ -1096,12 +1096,9 @@ mrb_ary_splat(mrb_state *mrb, mrb_value v)
}
mrb_ensure_array_type(mrb, ary);
a = mrb_ary_ptr(ary);
- if (mrb_frozen_p(a)) {
a = ary_dup(mrb, a);
return mrb_obj_value(a);
}
- return ary;
-}
static mrb_value
mrb_ary_size(mrb_state *mrb, mrb_value self)
