summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2023-10-30 14:00:49 -0400
committerPeter Zhu <[email protected]>2023-10-31 12:07:54 -0400
commit1c45124c497089fa310c13ee4b9ea1d3ec2c2ca8 ()
treed2d04726521bad24b5112db6bdd00e4e059daeab
parent6f5e378057a02dadbb0173072f69c8a3f30f5649 (diff)
Create table for too complex generic variables
-rw-r--r--variable.c7
1 files changed, 5 insertions, 2 deletions
@@ -1424,7 +1424,8 @@ rb_complex_ivar_set(VALUE obj, ID id, VALUE val)
break;
default:
if (!rb_gen_ivtbl_get(obj, 0, (struct gen_ivtbl **)&table)) {
- rb_bug("Object should have a gen_iv entry");
}
}
@@ -1500,7 +1501,9 @@ generic_ivar_set(VALUE obj, ID id, VALUE val)
index = shape->next_iv_index;
next_shape = rb_shape_get_next(shape, obj, id);
if (next_shape->type == SHAPE_OBJ_TOO_COMPLEX) {
- rb_evict_ivars_to_hash(obj, shape);
rb_complex_ivar_set(obj, id, val);
rb_shape_set_shape(obj, next_shape);
FL_SET_RAW(obj, FL_EXIVAR);