Skip to content

Commit 65d5d2e

Browse files
authored
Merge pull request #35 from ruby/fix-define-finalizer-ary
Fix object ID in rb_gc_impl_define_finalizer
2 parents e007176 + 75e4a82 commit 65d5d2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gc/mmtk/mmtk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ rb_gc_impl_define_finalizer(void *objspace_ptr, VALUE obj, VALUE block)
946946
rb_ary_push(table, block);
947947
}
948948
else {
949-
table = rb_ary_new3(2, block);
949+
table = rb_ary_new3(2, rb_obj_id(obj), block);
950950
rb_obj_hide(table);
951951
st_add_direct(objspace->finalizer_table, obj, table);
952952
}

0 commit comments

Comments
 (0)