diff options
author | Jean Boussier <[email protected]> | 2025-05-16 16:08:21 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-16 20:16:52 +0200 |
commit | 22c09135a8c459dd09f4fb9a6e9124d4a149083b (patch) | |
tree | f18c3747fc5939799cfee6d136676888ea063205 /variable.c | |
parent | 1e33a451bbbec1ffa15fc3032a0bdd74bd9b41ff (diff) |
rb_copy_generic_ivar: reset shape_id when no ivar are present
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13350
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/variable.c b/variable.c index d7f9579d9c..2f8a606930 100644 --- a/variable.c +++ b/variable.c @@ -2438,6 +2438,9 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj) clear: if (FL_TEST(dest, FL_EXIVAR)) { +#if SHAPE_IN_BASIC_FLAGS + RBASIC_SET_SHAPE_ID(dest, ROOT_SHAPE_ID); +#endif rb_free_generic_ivar(dest); FL_UNSET(dest, FL_EXIVAR); } |