aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
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);