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

parent 705f95c9
......@@ -1096,11 +1096,8 @@ 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;
a = ary_dup(mrb, a);
return mrb_obj_value(a);
}
static mrb_value
......
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