summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
-rw-r--r--variable.c6
1 files changed, 6 insertions, 0 deletions
@@ -1483,6 +1483,11 @@ generic_ivar_set(VALUE obj, ID id, VALUE val)
attr_index_t index;
// The returned shape will have `id` in its iv_table
rb_shape_t *shape = rb_shape_get_shape(obj);
if (UNLIKELY(shape->type == SHAPE_OBJ_TOO_COMPLEX)) {
rb_complex_ivar_set(obj, id, val);
@@ -1498,6 +1503,7 @@ generic_ivar_set(VALUE obj, ID id, VALUE val)
rb_evict_ivars_to_hash(obj, shape);
rb_complex_ivar_set(obj, id, val);
rb_shape_set_shape(obj, next_shape);
return;
}
shape = next_shape;