From d57b75297391af5b5d4f279eeeec084df37e9618 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 12 Feb 2026 09:23:13 +0100 Subject: [PATCH 1/5] [ruby/prism] Run ruby_parser versions for ruby 3.3 It will not support newer ruby versions: https://github.com/seattlerb/ruby_parser?tab=readme-ov-file#notice This way we don't have to exclude new syntax. https://github.com/ruby/prism/commit/2ffb629d4e --- test/prism/ruby/ruby_parser_test.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/prism/ruby/ruby_parser_test.rb b/test/prism/ruby/ruby_parser_test.rb index 6e4ba8ce16f25f..25107978f3828c 100644 --- a/test/prism/ruby/ruby_parser_test.rb +++ b/test/prism/ruby/ruby_parser_test.rb @@ -85,16 +85,11 @@ class RubyParserTest < TestCase "3.3-4.0/void_value.txt", - "3.4/circular_parameters.txt", - - "4.0/endless_methods_command_call.txt", - "4.0/leading_logical.txt", - # https://bugs.ruby-lang.org/issues/21168#note-5 "command_method_call_2.txt", ] - Fixture.each(except: failures) do |fixture| + Fixture.each_for_version(version: "3.3", except: failures) do |fixture| define_method(fixture.test_name) do assert_ruby_parser(fixture, todos.include?(fixture.path)) end From b698c35590671e2b6f5920ca01c83ec4ebea610b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Hasi=C5=84ski?= Date: Mon, 19 Jan 2026 18:35:52 +0100 Subject: [PATCH 2/5] Fix bundled gems warning for all subfeatures of hyphenated gems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #15822 fixed the warning for direct hyphenated gem requires like `benchmark/ips` → `benchmark-ips`. However, hyphenated gems often provide multiple files under their namespace. For example, `benchmark-ips` provides: - benchmark/ips.rb - benchmark/timing.rb - benchmark/compare.rb When requiring `benchmark/timing`, the previous fix only checked for `benchmark-timing` gem (doesn't exist), not `benchmark-ips` which actually provides the file. This fix checks if ANY gem matching `{prefix}-*` is in the bundle specs, which covers all subfeatures provided by hyphenated gems. Reported in https://github.com/ruby/ruby/pull/15822#issuecomment-123456 --- lib/bundled_gems.rb | 9 +++------ test/test_bundled_gems.rb | 8 ++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 85f23b2596bed7..403d80b48cd91f 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -129,13 +129,10 @@ def self.warning?(name, specs: nil) return if specs.include?(name) # Don't warn if a hyphenated gem provides this feature - # (e.g., benchmark-ips provides benchmark/ips, not the benchmark gem) + # (e.g., benchmark-ips provides benchmark/ips, benchmark/timing, etc.) if subfeature - feature_parts = feature.split("/") - if feature_parts.size >= 2 - hyphenated_gem = "#{feature_parts[0]}-#{feature_parts[1]}" - return if specs.include?(hyphenated_gem) - end + prefix = feature.split("/").first + "-" + return if specs.any? { |spec, _| spec.start_with?(prefix) } end return if WARNED[name] diff --git a/test/test_bundled_gems.rb b/test/test_bundled_gems.rb index 6e25df9b01f82d..e44c8348adc7bf 100644 --- a/test/test_bundled_gems.rb +++ b/test/test_bundled_gems.rb @@ -39,6 +39,14 @@ def test_no_warning_for_hyphenated_gem assert_nil Gem::BUNDLED_GEMS.warning?("benchmark/ips", specs: {"benchmark-ips" => true}) end + def test_no_warning_for_subfeatures_of_hyphenated_gem + # When benchmark-ips gem is in specs, requiring any "benchmark/*" subfeature + # should not warn, since hyphenated gems may provide multiple files + # (e.g., benchmark-ips provides benchmark/ips, benchmark/timing, benchmark/compare) + assert_nil Gem::BUNDLED_GEMS.warning?("benchmark/timing", specs: {"benchmark-ips" => true}) + assert_nil Gem::BUNDLED_GEMS.warning?("benchmark/compare", specs: {"benchmark-ips" => true}) + end + def test_warning_without_hyphenated_gem # When benchmark-ips is NOT in specs, requiring "benchmark/ips" should warn warning = Gem::BUNDLED_GEMS.warning?("benchmark/ips", specs: {}) From 2d159fbbb6e3a123654a6a60b12654eedfcefd9d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 12 Feb 2026 18:31:00 +0900 Subject: [PATCH 3/5] Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1 --- debug.c | 10 +++++----- gc.c | 6 +++--- io.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/debug.c b/debug.c index 1a2c27a5be5e15..730f860e7af988 100644 --- a/debug.c +++ b/debug.c @@ -368,7 +368,7 @@ setup_debug_log_filter(void) if (len >= MAX_DEBUG_LOG_FILTER_LEN) { fprintf(stderr, "too long: %s (max:%d)\n", str, MAX_DEBUG_LOG_FILTER_LEN - 1); - exit(1); + exit(EXIT_FAILURE); } // body @@ -396,7 +396,7 @@ setup_debug_log(void) debug_log.mem = (char *)malloc(MAX_DEBUG_LOG * MAX_DEBUG_LOG_MESSAGE_LEN); if (debug_log.mem == NULL) { fprintf(stderr, "setup_debug_log failed (can't allocate memory)\n"); - exit(1); + exit(EXIT_FAILURE); } ruby_debug_log_mode |= ruby_debug_log_memory; } @@ -424,7 +424,7 @@ setup_debug_log(void) break; default: fprintf(stderr, "can not parse RUBY_DEBUG_LOG filename: %s\n", log_config); - exit(1); + exit(EXIT_FAILURE); } } else { @@ -433,13 +433,13 @@ setup_debug_log(void) if (j >= DEBUG_LOG_MAX_PATH) { fprintf(stderr, "RUBY_DEBUG_LOG=%s is too long\n", log_config); - exit(1); + exit(EXIT_FAILURE); } } if ((debug_log.output = fopen(debug_log.output_file, "w")) == NULL) { fprintf(stderr, "can not open %s for RUBY_DEBUG_LOG\n", log_config); - exit(1); + exit(EXIT_FAILURE); } setvbuf(debug_log.output, NULL, _IONBF, 0); } diff --git a/gc.c b/gc.c index 4e1bb39e21f0b9..c0f8eebbab0137 100644 --- a/gc.c +++ b/gc.c @@ -714,7 +714,7 @@ ruby_modular_gc_init(void) break; default: fprintf(stderr, "Only alphanumeric, dash, and underscore is allowed in "RUBY_GC_LIBRARY"\n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -761,7 +761,7 @@ ruby_modular_gc_init(void) handle = dlopen(gc_so_path, RTLD_LAZY | RTLD_GLOBAL); if (!handle) { fprintf(stderr, "ruby_modular_gc_init: Shared library %s cannot be opened: %s\n", gc_so_path, dlerror()); - exit(1); + exit(EXIT_FAILURE); } gc_functions.modular_gc_loaded_p = true; @@ -773,7 +773,7 @@ ruby_modular_gc_init(void) gc_functions.name = dlsym(handle, func_name); \ if (!gc_functions.name) { \ fprintf(stderr, "ruby_modular_gc_init: %s function not exported by library %s\n", func_name, gc_so_path); \ - exit(1); \ + exit(EXIT_FAILURE); \ } \ } \ else { \ diff --git a/io.c b/io.c index cf95db70df961e..0ac78e96cca28d 100644 --- a/io.c +++ b/io.c @@ -8079,7 +8079,7 @@ popen_finish(VALUE port, VALUE klass) rb_protect(rb_yield, Qnil, NULL); rb_io_flush(rb_ractor_stdout()); rb_io_flush(rb_ractor_stderr()); - _exit(0); + _exit(EXIT_SUCCESS); } return Qnil; } From c46fe31138d2a76c6121c444135f5cb97e782ec7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 6 Feb 2026 14:42:29 +0900 Subject: [PATCH 4/5] [Bug #21862] Extract -D/-U options only for dtrace A workaround for GH-12563#issuecomment-3691590489. --- configure.ac | 3 +-- template/Makefile.in | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 2d9ccf1442920e..31b90fb664ecd9 100644 --- a/configure.ac +++ b/configure.ac @@ -4342,8 +4342,7 @@ AS_IF([test -n "${LIBS}"], [ MAINFLAGS=`echo " $MAINLIBS " | sed "s|$libspat"'||;s/^ *//;s/ *$//'` ]) LIBRUBYARG_STATIC="${LIBRUBYARG_STATIC} \$(MAINLIBS)" -CPPFLAGS="$CPPFLAGS "'$(DEFS)' -test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}' +CPPFLAGS="$CPPFLAGS "'$(DEFS) ${cppflags}' AS_IF([test -n "${cflags+set}"], [ cflagspat=`eval echo '"'"${cflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/^ *$/ /'` CFLAGS=`echo " $CFLAGS " | sed "s|$cflagspat"'|${cflags}|;s/^ *//;s/ *$//'` diff --git a/template/Makefile.in b/template/Makefile.in index 0b7b50e3aa3340..8e93efc310cd97 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -514,7 +514,17 @@ _PREFIXED_SYMBOL = TOKEN_PASTE($(SYMBOL_PREFIX),name) .d.h: @$(ECHO) translating probes $< - $(Q) $(DTRACE) -o $@.tmp -h -C $(INCFLAGS) $(CPPFLAGS) -s $< + $(Q) $(DTRACE) -o $@.tmp -h -C $(INCFLAGS) `echo "$(CPPFLAGS)" | \ + sed -e "s/^/\n/" \ + -e ": loop" \ + -e " s/\n\(\('[^']*'\|[^ ']*\)*\)/\1\n/" \ + -e " /^\(-[DU]\|'-[DU]\).*/P" \ + -e " s/^..*\n/\n/" \ + -e " T" \ + -e " s/\n */\n/" \ + -e "t loop" \ + -e "s/.*//" \ + ` -s $< $(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/RUBY_PROBES_H/' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' $@.tmp > $@ $(Q) $(RM) $@.tmp From 70cf85af9915b0a1d3e7ab3459e9e7ab685e4de1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 12 Feb 2026 20:30:12 +0900 Subject: [PATCH 5/5] Use Oregon mirror for cygwin download --- .github/workflows/cygwin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml index d5e6aae8bc6726..0e3b2e17c29927 100644 --- a/.github/workflows/cygwin.yml +++ b/.github/workflows/cygwin.yml @@ -46,6 +46,8 @@ jobs: uses: cygwin/cygwin-install-action@master with: packages: ruby gcc-core make autoconf libtool libssl-devel libyaml-devel libffi-devel zlib-devel rubygems + site: | + https://cygwin.osuosl.org/ - name: configure run: |