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 /gc/default/default.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 'gc/default/default.c')
-rw-r--r-- | gc/default/default.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gc/default/default.c b/gc/default/default.c index 5c6c2a9417..131086c338 100644 --- a/gc/default/default.c +++ b/gc/default/default.c @@ -2805,7 +2805,8 @@ rb_gc_impl_copy_finalizer(void *objspace_ptr, VALUE dest, VALUE obj) int lev = rb_gc_vm_lock(); if (RB_LIKELY(st_lookup(finalizer_table, obj, &data))) { - table = (VALUE)data; + table = rb_ary_dup((VALUE)data); + RARRAY_ASET(table, 0, rb_obj_id(dest)); st_insert(finalizer_table, dest, table); FL_SET(dest, FL_FINALIZE); } |