diff options
author | Jean Boussier <[email protected]> | 2025-05-15 14:04:36 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-16 20:16:52 +0200 |
commit | ec8900e3eb7f0008a635fb6fbabde3eb7802536b (patch) | |
tree | 29c4e3a26a12807e9875c8474da11756664459c7 /object.c | |
parent | a29442701785463d0febf5b8cf217246e927bfae (diff) |
rb_gc_impl_copy_finalizer: generate a new object id
Fix a regression introduced by: https://github.com/ruby/ruby/pull/13155
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13350
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -409,11 +409,11 @@ init_copy(VALUE dest, VALUE obj) RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR); // Copies the shape id from obj to dest RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR); - rb_gc_copy_attributes(dest, obj); rb_copy_generic_ivar(dest, obj); if (RB_TYPE_P(obj, T_OBJECT)) { rb_obj_copy_ivar(dest, obj); } + rb_gc_copy_attributes(dest, obj); } static VALUE immutable_obj_clone(VALUE obj, VALUE kwfreeze); |