summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-05-09 12:02:48 +0200
committerJean Boussier <[email protected]>2025-05-09 20:45:48 +0200
commit3135eddb4e8c6975b6fa5345f15fdaa55257851a (patch)
tree99488880309b2ff87db08702907fd21ea1b4cfb5 /gc.c
parente2f5e233b53208f032e9196cb3e411add1658853 (diff)
Refactor `FIRST_T_OBJECT_SHAPE_ID` to not be used outside `shape.c`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13291
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 4bff60b743..43cd87e9de 100644
--- a/gc.c
+++ b/gc.c
@@ -384,7 +384,7 @@ rb_gc_rebuild_shape(VALUE obj, size_t heap_id)
return (uint32_t)orig_shape_id;
}
- shape_id_t initial_shape_id = (shape_id_t)(heap_id + FIRST_T_OBJECT_SHAPE_ID);
+ shape_id_t initial_shape_id = rb_shape_root(heap_id);
shape_id_t new_shape_id = rb_shape_traverse_from_new_root(initial_shape_id, orig_shape_id);
if (new_shape_id == INVALID_SHAPE_ID) {