Assert that object is not frozen in rb_gc_impl_define_finalizer
This commit is contained in:
parent
e8aa9daa5b
commit
57d9b8ee07
Notes:
git
2024-07-19 12:53:51 +00:00
@ -2970,6 +2970,8 @@ rb_gc_impl_define_finalizer(void *objspace_ptr, VALUE obj, VALUE block)
|
||||
VALUE table;
|
||||
st_data_t data;
|
||||
|
||||
GC_ASSERT(!OBJ_FROZEN(obj));
|
||||
|
||||
RBASIC(obj)->flags |= FL_FINALIZE;
|
||||
|
||||
if (st_lookup(finalizer_table, obj, &data)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user