From b03b251aa4b4a7098721f3497f519f1b3e930f62 Mon Sep 17 00:00:00 2001 From: Haldun Bayhantopcu Date: Wed, 15 Feb 2023 22:40:16 +0100 Subject: Handle all non-object type objects --- shape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shape.c') diff --git a/shape.c b/shape.c index 6852a8d554..0e21d8a921 100644 --- a/shape.c +++ b/shape.c @@ -239,7 +239,7 @@ remove_shape_recursive(VALUE obj, ID id, rb_shape_t * shape, VALUE * removed) if (new_parent) { bool dont_care; enum ruby_value_type type = BUILTIN_TYPE(obj); - bool new_shape_necessary = type == T_CLASS || type == T_MODULE; + bool new_shape_necessary = type != T_OBJECT; rb_shape_t * new_child = get_next_shape_internal(new_parent, shape->edge_name, shape->type, &dont_care, true, new_shape_necessary); new_child->capacity = shape->capacity; if (new_child->type == SHAPE_IVAR) { -- cgit v1.2.1