From 320f5588b6a7e8f3f2d3c6dcc24e0a66e0f9c3c6 Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Tue, 14 Jan 2025 15:02:36 +0100 Subject: [PATCH] Fix compilation with ruby-3.4 and gcc-14 Depending on the numeric argument, the function pointer passed is expected to have different signatures. Up go gcc-13, it is only a warning (and the called method would have raised anyway), but with gcc-14 it becomes a compilation error. See also: https://docs.ruby-lang.org/en/master/extension_rdoc.html#label-Method+and+singleton+method+definition --- ext/raspell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/raspell.c b/ext/raspell.c index 0682796..f8f9ac7 100644 --- a/ext/raspell.c +++ b/ext/raspell.c @@ -45,7 +45,7 @@ void Init_dictinfo() { cDictInfo = rb_define_class("AspellDictInfo", rb_cObject); //CLASS METHODS============================================================ - rb_define_singleton_method(cDictInfo, "new", dictinfo_s_new, 0); + rb_define_singleton_method(cDictInfo, "new", dictinfo_s_new, -1); //METHODS ================================================================= rb_define_method(cDictInfo, "name", dictinfo_name, 0);