Fix `mrb_ary_splat()` to copy the array always.
MODIFY
src/array.c
src/array.c
@@ -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)

Fix `mrb_ary_splat()` to copy the array always.