summaryrefslogtreecommitdiff
path: root/variable.c
diff options
authorJean Boussier <[email protected]>2025-05-05 13:47:08 +0200
committerJean Boussier <[email protected]>2025-05-05 14:44:49 +0200
commitbbea71fafb41aeac1e813498acc26f7903af1efb (patch)
tree3aa72be5a603cea8138d16ceb37f8091a8f28f2a /variable.c
parent53ae558042493fa0f2c4408e9fdc1afe290ef712 (diff)
variable.c: Fix too_complex shape initialization
`SHAPE_OBJ_TOO_COMPLEX` is a `shape_type` not a `shape_id_t`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13257
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index a0e2cdd9a5..abc8abbdf9 100644
--- a/variable.c
+++ b/variable.c
@@ -1709,7 +1709,7 @@ generic_ivar_set_too_complex_table(VALUE obj, void *data)
if (!rb_gen_ivtbl_get(obj, 0, &ivtbl)) {
ivtbl = xmalloc(sizeof(struct gen_ivtbl));
#if !SHAPE_IN_BASIC_FLAGS
- ivtbl->shape_id = SHAPE_OBJ_TOO_COMPLEX;
+ ivtbl->shape_id = OBJ_TOO_COMPLEX_SHAPE_ID;
#endif
ivtbl->as.complex.table = st_init_numtable_with_size(1);
@@ -2117,7 +2117,7 @@ rb_copy_generic_ivar(VALUE clone, VALUE obj)
if (rb_shape_obj_too_complex(obj)) {
new_ivtbl = xmalloc(sizeof(struct gen_ivtbl));
#if !SHAPE_IN_BASIC_FLAGS
- new_ivtbl->shape_id = SHAPE_OBJ_TOO_COMPLEX;
+ new_ivtbl->shape_id = OBJ_TOO_COMPLEX_SHAPE_ID;
#endif
new_ivtbl->as.complex.table = st_copy(obj_ivtbl->as.complex.table);
}