From d1664625587a37d969ac1d72d087523f3ba42cd1 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 10 Jun 2024 10:51:51 +0200 Subject: [PATCH] rb_objspace_call_finalizer_i --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gc.c b/gc.c index e4bc90eb15535e..25752c0cfa6a55 100644 --- a/gc.c +++ b/gc.c @@ -4363,7 +4363,7 @@ rb_objspace_call_finalizer_i(VALUE obj, void *data) switch (BUILTIN_TYPE(obj)) { case T_DATA: - if (!rb_free_at_exit && (!DATA_PTR(obj) || !RDATA(obj)->dfree)) break; + if (!rb_free_at_exit && (!RTYPEDDATA_GET_DATA(obj) || !RANY(obj)->as.typeddata.type->function.dfree)) break; if (rb_obj_is_thread(obj)) break; if (rb_obj_is_mutex(obj)) break; if (rb_obj_is_fiber(obj)) break;