mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
class.c (init_copy): add an assertion
This commit is contained in:
@@ -2737,6 +2737,7 @@ mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
|
||||
static void
|
||||
init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
|
||||
{
|
||||
mrb_assert((mrb_type(dest) == mrb_type(obj)));
|
||||
switch (mrb_type(obj)) {
|
||||
case MRB_TT_ICLASS:
|
||||
copy_class(mrb, dest, obj);
|
||||
|
||||
Reference in New Issue
Block a user