Skip to content
Permalink
Browse files Browse the repository at this point in the history
Should not call initialize_copy for TT_ICLASS; fix #4027
Since `TT_ICLASS` is a internal object that should never be revealed
to Ruby world.
  • Loading branch information
matz committed May 30, 2018
1 parent 1dddc2f commit b64ce17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kernel.c
Expand Up @@ -279,6 +279,9 @@ static void
init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
{
switch (mrb_type(obj)) {
case MRB_TT_ICLASS:
copy_class(mrb, dest, obj);
return;
case MRB_TT_CLASS:
case MRB_TT_MODULE:
copy_class(mrb, dest, obj);
Expand Down

0 comments on commit b64ce17

Please sign in to comment.