mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix mrb_ary_splat() to copy the array always.
This commit is contained in:
+2
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user