[ruby/mmtk] Fix object ID in rb_gc_impl_define_finalizer
The 0th element of the finalizer table array should be the object ID. https://github.com/ruby/mmtk/commit/75e4a82652
This commit is contained in:
parent
8f50bb7c24
commit
3487117e55
@ -946,7 +946,7 @@ rb_gc_impl_define_finalizer(void *objspace_ptr, VALUE obj, VALUE block)
|
||||
rb_ary_push(table, block);
|
||||
}
|
||||
else {
|
||||
table = rb_ary_new3(2, block);
|
||||
table = rb_ary_new3(2, rb_obj_id(obj), block);
|
||||
rb_obj_hide(table);
|
||||
st_add_direct(objspace->finalizer_table, obj, table);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user