diff options
author | Jean Boussier <[email protected]> | 2025-05-08 20:47:51 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-09 10:22:51 +0200 |
commit | c9b08882b796c9d3a5f92d57d0b4f866fb24f3ac (patch) | |
tree | 2012f42eea9fc420e656566be1716feec7fe85b1 /variable.c | |
parent | e0200cfba03bf7d23b6e298c35ca2636cbbdbd91 (diff) |
Refactor `rb_shape_get_next` to return an ID
Also rename it, and change parameters to be consistent with
other transition functions.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13283
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 92206e4b11..51fd9c48ba 100644 --- a/variable.c +++ b/variable.c @@ -1639,7 +1639,8 @@ general_ivar_set(VALUE obj, ID id, VALUE val, void *data, rb_raise(rb_eArgError, "too many instance variables"); } - rb_shape_t *next_shape = rb_shape_get_next(current_shape, obj, id); + shape_id_t next_shape_id = rb_shape_transition_add_ivar(obj, id); + rb_shape_t *next_shape = RSHAPE(next_shape_id); if (UNLIKELY(rb_shape_too_complex_p(next_shape))) { transition_too_complex_func(obj, data); goto too_complex; |