diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2023-11-06 11:10:37 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-11-06 12:39:52 +0100 |
commit | 4a6bdbd6dc160c4614105f0478d398b2222429e0 (patch) | |
tree | acb48dd9fa5f6eec673cdde79fcf6fbe0bc49338 /variable.c | |
parent | 66769dcd12b1f323e7d38ab1280700a6ffe509d7 (diff) | |
download | ruby-4a6bdbd6dc160c4614105f0478d398b2222429e0.tar.gz |
generic_ivar_set: properly check for TOO_COMPLEX on capacity transition
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 414da14f11..d3ae9791e8 100644 --- a/variable.c +++ b/variable.c @@ -1516,7 +1516,7 @@ generic_ivar_set(VALUE obj, ID id, VALUE val) RUBY_ASSERT(index == shape->capacity); rb_shape_t *next_shape = rb_shape_transition_shape_capa(shape); - if (shape->type == SHAPE_OBJ_TOO_COMPLEX) { + if (next_shape->type == SHAPE_OBJ_TOO_COMPLEX) { rb_evict_ivars_to_hash(obj, shape); rb_complex_ivar_set(obj, id, val); FL_SET_RAW(obj, FL_EXIVAR); |