aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-11-10 11:27:49 -0500
committerPeter Zhu <peter@peterzhu.ca>2023-11-10 11:27:49 -0500
commit5f3fb4f4e397735783743fe52a7899b614bece20 (patch)
tree07a7df0703e4ebe315458d45ccca3d9d7a59693e /variable.c
parent3b69637eba307a6e7a2951be0147e4811b77b535 (diff)
downloadruby-5f3fb4f4e397735783743fe52a7899b614bece20.tar.gz
Revert "Remove SHAPE_CAPACITY_CHANGE shapes"
This reverts commit f6910a61122931e4193bcc0fad18d839c319b720. We're seeing crashes in the test suite of Shopify's core monolith after this change.
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 653fa58552..72c0fd7c2b 100644
--- a/variable.c
+++ b/variable.c
@@ -1509,7 +1509,7 @@ generic_ivar_lookup_ensure_size(st_data_t *k, st_data_t *v, st_data_t u, int exi
if (!existing || ivar_lookup->resize) {
if (existing) {
RUBY_ASSERT(ivar_lookup->shape->type == SHAPE_IVAR);
- RUBY_ASSERT(rb_shape_get_shape_by_id(ivar_lookup->shape->parent_id)->capacity < ivar_lookup->shape->capacity);
+ RUBY_ASSERT(rb_shape_get_shape_by_id(ivar_lookup->shape->parent_id)->type == SHAPE_CAPACITY_CHANGE);
}
else {
FL_SET_RAW((VALUE)*k, FL_EXIVAR);
@@ -1895,6 +1895,7 @@ iterate_over_shapes_with_callback(rb_shape_t *shape, rb_ivar_foreach_callback_fu
}
}
return false;
+ case SHAPE_CAPACITY_CHANGE:
case SHAPE_FROZEN:
case SHAPE_T_OBJECT:
return iterate_over_shapes_with_callback(rb_shape_get_parent(shape), callback, itr_data);