mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
rb_gc_impl_copy_finalizer: generate a new object id
Fix a regression introduced by: https://github.com/ruby/ruby/pull/13155
This commit is contained in:
parent
a294427017
commit
ec8900e3eb
Notes:
git
2025-05-16 18:17:06 +00:00
4 changed files with 25 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -985,7 +985,8 @@ rb_gc_impl_copy_finalizer(void *objspace_ptr, VALUE dest, VALUE obj)
|
|||
|
||||
int lev = rb_gc_vm_lock();
|
||||
if (RB_LIKELY(st_lookup(objspace->finalizer_table, obj, &data))) {
|
||||
table = (VALUE)data;
|
||||
table = rb_ary_dup((VALUE)data);
|
||||
RARRAY_ASET(table, 0, rb_obj_id(dest));
|
||||
st_insert(objspace->finalizer_table, dest, table);
|
||||
FL_SET(dest, FL_FINALIZE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue