From bf02b2aaa1e4d7688b84ea771a56d9d53e63015c Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sun, 1 Jan 2023 18:18:54 -0800 Subject: [PATCH] Avoid warning on Ruby 3.2 Without this, running on Ruby 3.2 gives the following warning: tkutil.so: warning: undefining the allocator of T_DATA class TkUtil::CallbackSubst::Info --- ext/tk/tkutil/tkutil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index f49cdab..7db750d 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -1797,6 +1797,7 @@ Init_tkutil(void) rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0); cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject); + rb_undef_alloc_func(cSUBST_INFO); rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0); ID_SUBST_INFO = rb_intern("SUBST_INFO");