summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2023-11-02 09:49:23 -0400
committerPeter Zhu <[email protected]>2023-11-02 13:42:11 -0400
commit38ba040d8bda65321daad8d5bfa8956b5072e826 (patch)
tree5c1884f4d99ecd2b0326eac0e8f843ecb917a217 /gc.c
parentad4f973ecd0a3481ff1abaa972d457e9f5b5fb4e (diff)
Make every initial size pool shape a root shape
This commit makes every initial size pool shape a root shape and assigns it a capacity of 0.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 6f13ff9284..efbb254168 100644
--- a/gc.c
+++ b/gc.c
@@ -2980,8 +2980,7 @@ rb_class_instance_allocate_internal(VALUE klass, VALUE flags, bool wb_protected)
}
VALUE obj = newobj_of(GET_RACTOR(), klass, flags, 0, 0, 0, wb_protected, size);
- RUBY_ASSERT(rb_shape_get_shape(obj)->type == SHAPE_ROOT ||
- rb_shape_get_shape(obj)->type == SHAPE_INITIAL_CAPACITY);
+ RUBY_ASSERT(rb_shape_get_shape(obj)->type == SHAPE_ROOT);
// Set the shape to the specific T_OBJECT shape which is always
// SIZE_POOL_COUNT away from the root shape.