diff options
author | Jemma Issroff <[email protected]> | 2022-12-09 13:33:48 -0500 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2022-12-10 16:10:21 +0100 |
commit | 12003acbb9c2c2624be8c41c22c15e6d1fa3a42e () | |
tree | fa03a97a6c1069e7cf760b7b4f320bec96a0d82e /shape.c | |
parent | 0645c8b3c1f7448d88c6fe6a4ebbd7b3a091c042 (diff) |
Update shape capacity when removing ivar and rewriting shape transitions
Since edc7af48acd12666a2945f30901d16b62a39f474, we now no longer have undef ivar transitions. Instead, we rebuild the shapes table. When we do this, we need to ensure that we retain our capacities on shapes.
Notes: Merged: https://.com/ruby/ruby/pull/6894
-rw-r--r-- | shape.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -242,9 +242,10 @@ remove_shape_recursive(VALUE obj, ID id, rb_shape_t * shape, VALUE * removed) // has the same attributes as this shape. if (new_parent) { rb_shape_t * new_child = get_next_shape_internal(new_parent, shape->edge_name, shape->type); if (new_child->type == SHAPE_IVAR) { move_iv(obj, id, shape->next_iv_index - 1, new_child->next_iv_index - 1); - } return new_child; |