Don't allow SHAPE_T_OBJECT in rb_shape_alloc_new_child

This commit is contained in:
Peter Zhu 2024-03-12 17:34:38 -04:00
parent 88373fe2e8
commit c6089b5654

View File

@ -474,11 +474,11 @@ rb_shape_alloc_new_child(ID id, rb_shape_t * shape, enum shape_type shape_type)
}
break;
case SHAPE_FROZEN:
case SHAPE_T_OBJECT:
new_shape->next_iv_index = shape->next_iv_index;
break;
case SHAPE_OBJ_TOO_COMPLEX:
case SHAPE_ROOT:
case SHAPE_T_OBJECT:
rb_bug("Unreachable");
break;
}