summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-03-12 14:34:17 -0400
committerPeter Zhu <[email protected]>2024-03-13 09:55:52 -0400
commit3896f9940e7f663dd4db8162c071d72e2539addf (patch)
tree0fe380931280db7693778a067750d0f093ee2cb2 /object.c
parent6b0434c0f721a62d617b26986565985598c7b8c9 (diff)
Make special const and too complex shapes before T_OBJECT shapes
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index b420f49067..26c03075a0 100644
--- a/object.c
+++ b/object.c
@@ -135,7 +135,7 @@ rb_class_allocate_instance(VALUE klass)
RUBY_ASSERT(rb_shape_get_shape(obj)->type == SHAPE_ROOT);
// Set the shape to the specific T_OBJECT shape.
- ROBJECT_SET_SHAPE_ID(obj, (shape_id_t)(rb_gc_size_pool_id_for_size(size) + 1));
+ ROBJECT_SET_SHAPE_ID(obj, (shape_id_t)(rb_gc_size_pool_id_for_size(size) + FIRST_T_OBJECT_SHAPE_ID));
#if RUBY_DEBUG
RUBY_ASSERT(!rb_shape_obj_too_complex(obj));