From 52259a185e493b67c3433cf277a378e363f27f3c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 5 Nov 2025 13:43:40 +0900 Subject: [PATCH 1/2] Pass TESTOPTS to the tests --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index a5aa36798b..3fdfc28ad3 100644 --- a/Rakefile +++ b/Rakefile @@ -46,8 +46,9 @@ end desc "Run test" task :test do + require 'shellwords' ENV["RUBYOPT"] = "-I#{extra_require_path} -rbundler/setup" - ruby("run-test.rb") + ruby("run-test.rb", *ENV["TESTOPTS"]&.shellsplit) end desc "Run benchmark" From f6d178fda5c03035f9e3a50220f6404784f65352 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 5 Nov 2025 13:46:28 +0900 Subject: [PATCH 2/2] ISO C90 forbids mixed declarations and code Cannot use C99 syntax, as far as supporting Ruby 2.6 and earlier. --- ext/strscan/strscan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 39178c6259..93ba9da955 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -1274,7 +1274,7 @@ static VALUE strscan_scan_base10_integer(VALUE self) { char *ptr; - long len = 0; + long len = 0, remaining_len; struct strscanner *p; GET_SCANNER(self, p); @@ -1284,7 +1284,7 @@ strscan_scan_base10_integer(VALUE self) ptr = CURPTR(p); - long remaining_len = S_RESTLEN(p); + remaining_len = S_RESTLEN(p); if (remaining_len <= 0) { return Qnil; @@ -1311,7 +1311,7 @@ static VALUE strscan_scan_base16_integer(VALUE self) { char *ptr; - long len = 0; + long len = 0, remaining_len; struct strscanner *p; GET_SCANNER(self, p); @@ -1321,7 +1321,7 @@ strscan_scan_base16_integer(VALUE self) ptr = CURPTR(p); - long remaining_len = S_RESTLEN(p); + remaining_len = S_RESTLEN(p); if (remaining_len <= 0) { return Qnil;