From babf81ccfc40b8d9b06d2c6c1f3ff47c39bdea99 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 de34844503a3bf..3b18bcf3dbbf4e 100644 --- a/gc.c +++ b/gc.c @@ -4372,7 +4372,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;