mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-data (mrb_data_init_copy): use data_corrupted() for errors
This commit is contained in:
@@ -270,7 +270,7 @@ mrb_data_init_copy(mrb_state *mrb, mrb_value copy)
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "wrong argument class");
|
||||
}
|
||||
if (!data_p(s)) {
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "corrupted Data");
|
||||
data_corrupted(mrb);
|
||||
}
|
||||
mrb_ary_replace(mrb, copy, s);
|
||||
mrb_obj_freeze(mrb, copy);
|
||||
|
||||
Reference in New Issue
Block a user