From 8de2622c1291afd29a9a570e6b396bbe722360a3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 20 Dec 2025 21:37:45 +0900 Subject: [PATCH 01/13] Fix a fragile test `Dir.mktmpdir` concatenates a random base-36 number separated by "-", so may generate pathnames containing "-j2". --- test/rubygems/test_gem_commands_update_command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index 3bb4a72c4151ad..5ed12ad4814095 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -722,7 +722,7 @@ def test_pass_down_the_job_option_to_make gem_make_out = File.read(File.join(gemspec.extension_dir, "gem_make.out")) if vc_windows? && nmake_found? - refute_includes(gem_make_out, "-j2") + refute_includes(gem_make_out, " -j2") else assert_includes(gem_make_out, "make -j2") end From ba2f6972193cdbd7c1e77e26212513e47926b115 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 24 Dec 2025 22:47:02 +0900 Subject: [PATCH 02/13] Revert "Extract `ruby_api_version_name`" This reverts commit 9b576cd6255aba97e5e2f55f4b09f00c7dd0e839. --- ruby.c | 9 ++++----- test/ruby/test_rubyoptions.rb | 19 +++++++++---------- version.c | 10 +--------- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/ruby.c b/ruby.c index 11376cbe7066a9..36d6ed203b5d11 100644 --- a/ruby.c +++ b/ruby.c @@ -61,6 +61,7 @@ #include "ruby/util.h" #include "ruby/version.h" #include "ruby/internal/error.h" +#include "version.h" #define singlebit_only_p(x) !((x) & ((x)-1)) STATIC_ASSERT(Qnil_1bit_from_Qfalse, singlebit_only_p(Qnil^Qfalse)); @@ -305,8 +306,6 @@ ruby_show_usage_line(const char *name, const char *secondary, const char *descri description, help, highlight, width, columns); } -RUBY_EXTERN const char ruby_api_version_name[]; - static void usage(const char *name, int help, int highlight, int columns) { @@ -409,9 +408,9 @@ usage(const char *name, int help, int highlight, int columns) unsigned int w = (columns > 80 ? (columns - 79) / 2 : 0) + 16; #define SHOW(m) show_usage_line(&(m), help, highlight, w, columns) - printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n", sb, se, name); - printf("\n""Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", - ruby_api_version_name); + printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n\n", sb, se, name); + printf("Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", + RUBY_PATCHLEVEL == -1 ? "master" : STRINGIZE(RUBY_VERSION_MAJOR) "." STRINGIZE(RUBY_VERSION_MINOR)); for (i = 0; i < num; ++i) SHOW(usage_msg[i]); diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 2ec6478a7fd058..96d932aea2e652 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -47,27 +47,26 @@ def test_source_file assert_in_out_err([], "", [], []) end - version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" - OPTIONS_LINK = "https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html" - def test_usage assert_in_out_err(%w(-h)) do |r, e| - _, _, link, *r = r - assert_include(link, OPTIONS_LINK) - assert_operator(r.size, :<=, 24) - longer = r.select {|x| x.size >= 80} + assert_operator(r.size, :<=, 26) + longer = r[3..-1].select {|x| x.size >= 80} assert_equal([], longer) assert_equal([], e) + + version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" + assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end def test_usage_long assert_in_out_err(%w(--help)) do |r, e| - _, _, link, *r = r - assert_include(link, OPTIONS_LINK) - longer = r.select {|x| x.size > 80} + longer = r[3..-1].select {|x| x.size > 80} assert_equal([], longer) assert_equal([], e) + + version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" + assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end diff --git a/version.c b/version.c index 554783265201f0..448925f1fb2485 100644 --- a/version.c +++ b/version.c @@ -25,9 +25,8 @@ #ifdef RUBY_REVISION # if RUBY_PATCHLEVEL == -1 -# define RUBY_API_VERSION_NAME "master" # ifndef RUBY_BRANCH_NAME -# define RUBY_BRANCH_NAME RUBY_API_VERSION_NAME +# define RUBY_BRANCH_NAME "master" # endif # define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "RUBY_REVISION # else @@ -37,9 +36,6 @@ # define RUBY_REVISION "HEAD" # define RUBY_REVISION_STR "" #endif -#ifndef RUBY_API_VERSION_NAME -# define RUBY_API_VERSION_NAME RUBY_API_VERSION_STR -#endif #if !defined RUBY_RELEASE_DATETIME || RUBY_PATCHLEVEL != -1 # undef RUBY_RELEASE_DATETIME # define RUBY_RELEASE_DATETIME RUBY_RELEASE_DATE @@ -49,9 +45,6 @@ #define MKSTR(type) rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1)) #define MKINT(name) INT2FIX(ruby_##name) -#define RUBY_API_VERSION_STR \ - STRINGIZE(RUBY_API_VERSION_MAJOR) "." \ - STRINGIZE(RUBY_API_VERSION_MINOR) const int ruby_api_version[] = { RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, @@ -84,7 +77,6 @@ const char ruby_revision[] = RUBY_FULL_REVISION; const char ruby_release_date[] = RUBY_RELEASE_DATE; const char ruby_platform[] = RUBY_PLATFORM; const int ruby_patchlevel = RUBY_PATCHLEVEL; -const char ruby_api_version_name[] = RUBY_API_VERSION_NAME; const char ruby_description[] = "ruby " RUBY_VERSION RUBY_PATCHLEVEL_STR " " "(" RUBY_RELEASE_DATETIME RUBY_REVISION_STR ") " From 285e22edc55522f3466357c4c27615a6015d84dc Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 24 Dec 2025 22:52:23 +0900 Subject: [PATCH 03/13] Revert "Add link to Ruby options doc in help text" This reverts commit 31ff07ed1eb05d01f7da3c017d542137a3db1e94. * Don't add a test which only runs on production release * https://github.com/ruby/actions/actions/runs/20486784889/job/58870959976 * Don't add a new line to `ruby --help` * https://github.com/ruby/ruby/pull/14142#issuecomment-3689829564 --- doc/language/options.md | 7 ------- ruby.c | 6 +----- test/ruby/test_rubyoptions.rb | 12 +++--------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/doc/language/options.md b/doc/language/options.md index c805c7dd65c2c0..cca87f42dedf0f 100644 --- a/doc/language/options.md +++ b/doc/language/options.md @@ -1,10 +1,3 @@ - - # Ruby Command-Line Options ## About the Examples diff --git a/ruby.c b/ruby.c index 36d6ed203b5d11..d7a608a00dd365 100644 --- a/ruby.c +++ b/ruby.c @@ -61,7 +61,6 @@ #include "ruby/util.h" #include "ruby/version.h" #include "ruby/internal/error.h" -#include "version.h" #define singlebit_only_p(x) !((x) & ((x)-1)) STATIC_ASSERT(Qnil_1bit_from_Qfalse, singlebit_only_p(Qnil^Qfalse)); @@ -408,10 +407,7 @@ usage(const char *name, int help, int highlight, int columns) unsigned int w = (columns > 80 ? (columns - 79) / 2 : 0) + 16; #define SHOW(m) show_usage_line(&(m), help, highlight, w, columns) - printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n\n", sb, se, name); - printf("Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", - RUBY_PATCHLEVEL == -1 ? "master" : STRINGIZE(RUBY_VERSION_MAJOR) "." STRINGIZE(RUBY_VERSION_MINOR)); - + printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n", sb, se, name); for (i = 0; i < num; ++i) SHOW(usage_msg[i]); diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 96d932aea2e652..735d2681fb6a13 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -49,24 +49,18 @@ def test_source_file def test_usage assert_in_out_err(%w(-h)) do |r, e| - assert_operator(r.size, :<=, 26) - longer = r[3..-1].select {|x| x.size >= 80} + assert_operator(r.size, :<=, 25) + longer = r[1..-1].select {|x| x.size >= 80} assert_equal([], longer) assert_equal([], e) - - version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" - assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end def test_usage_long assert_in_out_err(%w(--help)) do |r, e| - longer = r[3..-1].select {|x| x.size > 80} + longer = r[1..-1].select {|x| x.size > 80} assert_equal([], longer) assert_equal([], e) - - version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" - assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end From 29ffc5d624f21d101d819bc77b7a048ab70d1c13 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 24 Dec 2025 23:07:35 +0900 Subject: [PATCH 04/13] Reapply "Extract `ruby_api_version_name`" This reverts commit ba2f6972193cdbd7c1e77e26212513e47926b115. Box already used ruby_api_version_name. --- ruby.c | 5 +++++ version.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ruby.c b/ruby.c index d7a608a00dd365..11376cbe7066a9 100644 --- a/ruby.c +++ b/ruby.c @@ -305,6 +305,8 @@ ruby_show_usage_line(const char *name, const char *secondary, const char *descri description, help, highlight, width, columns); } +RUBY_EXTERN const char ruby_api_version_name[]; + static void usage(const char *name, int help, int highlight, int columns) { @@ -408,6 +410,9 @@ usage(const char *name, int help, int highlight, int columns) #define SHOW(m) show_usage_line(&(m), help, highlight, w, columns) printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n", sb, se, name); + printf("\n""Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", + ruby_api_version_name); + for (i = 0; i < num; ++i) SHOW(usage_msg[i]); diff --git a/version.c b/version.c index 448925f1fb2485..554783265201f0 100644 --- a/version.c +++ b/version.c @@ -25,8 +25,9 @@ #ifdef RUBY_REVISION # if RUBY_PATCHLEVEL == -1 +# define RUBY_API_VERSION_NAME "master" # ifndef RUBY_BRANCH_NAME -# define RUBY_BRANCH_NAME "master" +# define RUBY_BRANCH_NAME RUBY_API_VERSION_NAME # endif # define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "RUBY_REVISION # else @@ -36,6 +37,9 @@ # define RUBY_REVISION "HEAD" # define RUBY_REVISION_STR "" #endif +#ifndef RUBY_API_VERSION_NAME +# define RUBY_API_VERSION_NAME RUBY_API_VERSION_STR +#endif #if !defined RUBY_RELEASE_DATETIME || RUBY_PATCHLEVEL != -1 # undef RUBY_RELEASE_DATETIME # define RUBY_RELEASE_DATETIME RUBY_RELEASE_DATE @@ -45,6 +49,9 @@ #define MKSTR(type) rb_obj_freeze(rb_usascii_str_new_static(ruby_##type, sizeof(ruby_##type)-1)) #define MKINT(name) INT2FIX(ruby_##name) +#define RUBY_API_VERSION_STR \ + STRINGIZE(RUBY_API_VERSION_MAJOR) "." \ + STRINGIZE(RUBY_API_VERSION_MINOR) const int ruby_api_version[] = { RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, @@ -77,6 +84,7 @@ const char ruby_revision[] = RUBY_FULL_REVISION; const char ruby_release_date[] = RUBY_RELEASE_DATE; const char ruby_platform[] = RUBY_PLATFORM; const int ruby_patchlevel = RUBY_PATCHLEVEL; +const char ruby_api_version_name[] = RUBY_API_VERSION_NAME; const char ruby_description[] = "ruby " RUBY_VERSION RUBY_PATCHLEVEL_STR " " "(" RUBY_RELEASE_DATETIME RUBY_REVISION_STR ") " From 479f8682c80e695c2a1f8dd66c82cc530c5bbf40 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Wed, 24 Dec 2025 23:39:23 +0900 Subject: [PATCH 05/13] Remove extra help --- ruby.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ruby.c b/ruby.c index 11376cbe7066a9..b00fc1502dec1c 100644 --- a/ruby.c +++ b/ruby.c @@ -410,9 +410,6 @@ usage(const char *name, int help, int highlight, int columns) #define SHOW(m) show_usage_line(&(m), help, highlight, w, columns) printf("%sUsage:%s %s [options] [--] [filepath] [arguments]\n", sb, se, name); - printf("\n""Details and examples at https://docs.ruby-lang.org/en/%s/ruby/options_md.html\n", - ruby_api_version_name); - for (i = 0; i < num; ++i) SHOW(usage_msg[i]); From 96d876534e115ffbb92a72f7378da84fd54a3a87 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 24 Dec 2025 18:54:39 +0000 Subject: [PATCH 06/13] Bump RDoc to 7.0.3 --- NEWS.md | 5 +++-- gems/bundled_gems | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index a4abd2bdbc7afe..71dd7eab8f13b0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -296,8 +296,8 @@ The following bundled gems are promoted from default gems. * 0.4.0 to [v0.4.1][benchmark-v0.4.1], [v0.5.0][benchmark-v0.5.0] * logger 1.7.0 * 1.6.4 to [v1.6.5][logger-v1.6.5], [v1.6.6][logger-v1.6.6], [v1.7.0][logger-v1.7.0] -* rdoc 7.0.2 - * 6.14.0 to [v6.14.1][rdoc-v6.14.1], [v6.14.2][rdoc-v6.14.2], [v6.15.0][rdoc-v6.15.0], [v6.15.1][rdoc-v6.15.1], [v6.16.0][rdoc-v6.16.0], [v6.16.1][rdoc-v6.16.1], [v6.17.0][rdoc-v6.17.0], [v7.0.0][rdoc-v7.0.0], [v7.0.1][rdoc-v7.0.1], [v7.0.2][rdoc-v7.0.2] +* rdoc 7.0.3 + * 6.14.0 to [v6.14.1][rdoc-v6.14.1], [v6.14.2][rdoc-v6.14.2], [v6.15.0][rdoc-v6.15.0], [v6.15.1][rdoc-v6.15.1], [v6.16.0][rdoc-v6.16.0], [v6.16.1][rdoc-v6.16.1], [v6.17.0][rdoc-v6.17.0], [v7.0.0][rdoc-v7.0.0], [v7.0.1][rdoc-v7.0.1], [v7.0.2][rdoc-v7.0.2], [v7.0.3][rdoc-v7.0.3] * win32ole 1.9.2 * 1.9.1 to [v1.9.2][win32ole-v1.9.2] * irb 1.16.0 @@ -652,6 +652,7 @@ A lot of work has gone into making Ractors more stable, performant, and usable. [rdoc-v7.0.0]: https://github.com/ruby/rdoc/releases/tag/v7.0.0 [rdoc-v7.0.1]: https://github.com/ruby/rdoc/releases/tag/v7.0.1 [rdoc-v7.0.2]: https://github.com/ruby/rdoc/releases/tag/v7.0.2 +[rdoc-v7.0.3]: https://github.com/ruby/rdoc/releases/tag/v7.0.3 [win32ole-v1.9.2]: https://github.com/ruby/win32ole/releases/tag/v1.9.2 [irb-v1.15.0]: https://github.com/ruby/irb/releases/tag/v1.15.0 [irb-v1.15.1]: https://github.com/ruby/irb/releases/tag/v1.15.1 diff --git a/gems/bundled_gems b/gems/bundled_gems index 495f7afc694e0d..91867b57d92139 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -39,7 +39,7 @@ ostruct 0.6.3 https://github.com/ruby/ostruct pstore 0.2.0 https://github.com/ruby/pstore benchmark 0.5.0 https://github.com/ruby/benchmark logger 1.7.0 https://github.com/ruby/logger -rdoc 7.0.2 https://github.com/ruby/rdoc +rdoc 7.0.3 https://github.com/ruby/rdoc win32ole 1.9.2 https://github.com/ruby/win32ole irb 1.16.0 https://github.com/ruby/irb reline 0.6.3 https://github.com/ruby/reline From d0193e924003b33ab46ee4ac13fbec5d53d02f1b Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 25 Dec 2025 01:40:57 +0900 Subject: [PATCH 07/13] Bundle test-unit 3.7.5 --- gems/bundled_gems | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gems/bundled_gems b/gems/bundled_gems index 91867b57d92139..9461122e62dd73 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -9,7 +9,7 @@ minitest 6.0.0 https://github.com/minitest/minitest power_assert 3.0.1 https://github.com/ruby/power_assert rake 13.3.1 https://github.com/ruby/rake -test-unit 3.7.3 https://github.com/test-unit/test-unit +test-unit 3.7.5 https://github.com/test-unit/test-unit rexml 3.4.4 https://github.com/ruby/rexml rss 0.3.2 https://github.com/ruby/rss net-ftp 0.3.9 https://github.com/ruby/net-ftp From b92bc9654120547f9dd261ce04dacdb17bf720e1 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 25 Dec 2025 01:41:18 +0900 Subject: [PATCH 08/13] Skip test to avoid NoMemoryError --- tool/rbs_skip_tests | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/rbs_skip_tests b/tool/rbs_skip_tests index d5139705b3c4d3..ec149fdf5d0eef 100644 --- a/tool/rbs_skip_tests +++ b/tool/rbs_skip_tests @@ -45,3 +45,4 @@ test_linear_time?(RegexpSingletonTest) test_new(RegexpSingletonTest) ## Failed tests caused by unreleased version of Ruby +test_reachable_objects_from_root(ObjectSpaceTest) NoMemoryError with test-unit 3.7.5 From 8caea03213ff809544271d3135e0873d9c419532 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Thu, 25 Dec 2025 02:13:09 +0900 Subject: [PATCH 09/13] rbs_skip_tests_windows --- tool/rbs_skip_tests | 1 - tool/rbs_skip_tests_windows | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/rbs_skip_tests b/tool/rbs_skip_tests index ec149fdf5d0eef..d5139705b3c4d3 100644 --- a/tool/rbs_skip_tests +++ b/tool/rbs_skip_tests @@ -45,4 +45,3 @@ test_linear_time?(RegexpSingletonTest) test_new(RegexpSingletonTest) ## Failed tests caused by unreleased version of Ruby -test_reachable_objects_from_root(ObjectSpaceTest) NoMemoryError with test-unit 3.7.5 diff --git a/tool/rbs_skip_tests_windows b/tool/rbs_skip_tests_windows index 43888c98a71324..1b9f930e846624 100644 --- a/tool/rbs_skip_tests_windows +++ b/tool/rbs_skip_tests_windows @@ -105,3 +105,5 @@ test_new(TempfileSingletonTest) # Errno::EACCES: Permission denied @ apply2files - C:/a/_temp/d20250813-10156-f8z9pn/test.gz test_open(ZlibGzipReaderSingletonTest) + +test_reachable_objects_from_root(ObjectSpaceTest) To avoid NoMemoryError with test-unit 3.7.5 From 26a1a522b76cc9fd2ed2d963fd2df635f59b7a39 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 25 Dec 2025 05:47:34 +0900 Subject: [PATCH 10/13] Revert "Rollback to test-unit 3.7.3" This reverts commit c17307ac22f37f74786a4f016121c6ee8cc38915. --- NEWS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 71dd7eab8f13b0..c1c6d2d2c83a48 100644 --- a/NEWS.md +++ b/NEWS.md @@ -378,8 +378,8 @@ The following bundled gems are updated. * 2.0.5 to [v3.0.0][power_assert-v3.0.0], [v3.0.1][power_assert-v3.0.1] * rake 13.3.1 * 13.2.1 to [v13.3.0][rake-v13.3.0], [v13.3.1][rake-v13.3.1] -* test-unit 3.7.3 - * 3.6.7 to [3.6.8][test-unit-3.6.8], [3.6.9][test-unit-3.6.9], [3.7.0][test-unit-3.7.0], [3.7.1][test-unit-3.7.1], [3.7.2][test-unit-3.7.2], [3.7.3][test-unit-3.7.3] +* test-unit 3.7.5 + * 3.6.7 to [3.6.8][test-unit-3.6.8], [3.6.9][test-unit-3.6.9], [3.7.0][test-unit-3.7.0], [3.7.1][test-unit-3.7.1], [3.7.2][test-unit-3.7.2], [3.7.3][test-unit-3.7.3], [3.7.4][test-unit-3.7.4], [3.7.5][test-unit-3.7.5] * rexml 3.4.4 * rss 0.3.2 * 0.3.1 to [0.3.2][rss-0.3.2] @@ -756,6 +756,8 @@ A lot of work has gone into making Ractors more stable, performant, and usable. [test-unit-3.7.1]: https://github.com/test-unit/test-unit/releases/tag/3.7.1 [test-unit-3.7.2]: https://github.com/test-unit/test-unit/releases/tag/3.7.2 [test-unit-3.7.3]: https://github.com/test-unit/test-unit/releases/tag/3.7.3 +[test-unit-3.7.4]: https://github.com/test-unit/test-unit/releases/tag/3.7.4 +[test-unit-3.7.5]: https://github.com/test-unit/test-unit/releases/tag/3.7.5 [rss-0.3.2]: https://github.com/ruby/rss/releases/tag/0.3.2 [net-ftp-v0.3.9]: https://github.com/ruby/net-ftp/releases/tag/v0.3.9 [net-imap-v0.5.9]: https://github.com/ruby/net-imap/releases/tag/v0.5.9 From 8d097bc472fc66221dee23bb8f9e0dddac16db23 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 25 Dec 2025 05:52:41 +0900 Subject: [PATCH 11/13] Rollback to minitest-5.27.0 Test of 6.0.0 is not working with 4.0.0 stable version. https://github.com/ruby/actions/actions/runs/20488398805/job/58875672023#step:20:362 ``` rake aborted! NoMethodError: undefined method 'cov_filter=' for # (NoMethodError) self.cov_filter = %w[ tmp ] ^^^^^^^^^^^^^ /home/runner/work/actions/actions/ruby-4.0.0/gems/src/minitest/Rakefile:20:in 'block in ' /home/runner/work/actions/actions/ruby-4.0.0/.bundle/gems/hoe-3.20.0/lib/hoe.rb:394:in 'BasicObject#instance_eval' /home/runner/work/actions/actions/ruby-4.0.0/.bundle/gems/hoe-3.20.0/lib/hoe.rb:394:in 'Hoe.spec' /home/runner/work/actions/actions/ruby-4.0.0/gems/src/minitest/Rakefile:11:in '' /home/runner/work/actions/actions/ruby-4.0.0/.bundle/gems/rake-13.3.1/exe/rake:27:in '' (See full trace by running task with --trace) ``` --- NEWS.md | 2 +- gems/bundled_gems | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index c1c6d2d2c83a48..877b849ab148ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -373,7 +373,7 @@ The following default gems are updated. The following bundled gems are updated. -* minitest 6.0.0 +* minitest 5.27.0 * power_assert 3.0.1 * 2.0.5 to [v3.0.0][power_assert-v3.0.0], [v3.0.1][power_assert-v3.0.1] * rake 13.3.1 diff --git a/gems/bundled_gems b/gems/bundled_gems index 9461122e62dd73..82dffd091e9edb 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -6,7 +6,7 @@ # - revision: revision in repository-url to test # if `revision` is not given, "v"+`version` or `version` will be used. -minitest 6.0.0 https://github.com/minitest/minitest +minitest 5.27.0 https://github.com/minitest/minitest power_assert 3.0.1 https://github.com/ruby/power_assert rake 13.3.1 https://github.com/ruby/rake test-unit 3.7.5 https://github.com/test-unit/test-unit From 3e82da723241b7205dc2b7706c66e9ead1826cde Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 24 Dec 2025 17:37:25 -0500 Subject: [PATCH 12/13] ZJIT: Don't mark control-flow opcodes as invalidating locals (#15694) jump, branchif, etc don't invalidate locals in the JIT; they might in the interpreter because they can execute arbitrary code, but the JIT side exits before that happens. --- zjit/src/hir.rs | 16 ++++++++++- zjit/src/hir/opt_tests.rs | 30 ++++++++++----------- zjit/src/hir/tests.rs | 56 ++++++++++++++++----------------------- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 2f8f21225524d5..3f1ed83e4bd9b3 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -5299,6 +5299,20 @@ impl ProfileOracle { } } +fn invalidates_locals(opcode: u32, operands: *const VALUE) -> bool { + match opcode { + // Control-flow is non-leaf in the interpreter because it can execute arbitrary code on + // interrupt. But in the JIT, we side-exit if there is a pending interrupt. + YARVINSN_jump + | YARVINSN_branchunless + | YARVINSN_branchif + | YARVINSN_branchnil + | YARVINSN_leave => false, + // TODO(max): Read the invokebuiltin target from operands and determine if it's leaf + _ => unsafe { !rb_zjit_insn_leaf(opcode as i32, operands) } + } +} + /// The index of the self parameter in the HIR function pub const SELF_PARAM_IDX: usize = 0; @@ -5434,7 +5448,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result { } // Flag a future getlocal/setlocal to add a patch point if this instruction is not leaf. - if unsafe { !rb_zjit_insn_leaf(opcode as i32, pc.offset(1)) } { + if invalidates_locals(opcode, unsafe { pc.offset(1) }) { local_inval = true; } diff --git a/zjit/src/hir/opt_tests.rs b/zjit/src/hir/opt_tests.rs index 166d1d4754591e..2a70314fbb7f38 100644 --- a/zjit/src/hir/opt_tests.rs +++ b/zjit/src/hir/opt_tests.rs @@ -9638,26 +9638,24 @@ mod hir_opt_tests { Jump bb2(v8, v9, v10, v11, v12) bb2(v14:BasicObject, v15:BasicObject, v16:BasicObject, v17:BasicObject, v18:NilClass): CheckInterrupts - v27:BasicObject = GetLocal :a, l0, EP@6 - SetLocal :formatted, l0, EP@3, v27 - v39:BasicObject = GetLocal :formatted, l0, EP@3 + SetLocal :formatted, l0, EP@3, v15 PatchPoint SingleRactorMode - v56:HeapBasicObject = GuardType v14, HeapBasicObject - v57:HeapBasicObject = GuardShape v56, 0x1000 - StoreField v57, :@formatted@0x1001, v39 - WriteBarrier v57, v39 - v60:CShape[0x1002] = Const CShape(0x1002) - StoreField v57, :_shape_id@0x1003, v60 - v45:Class[VMFrozenCore] = Const Value(VALUE(0x1008)) + v54:HeapBasicObject = GuardType v14, HeapBasicObject + v55:HeapBasicObject = GuardShape v54, 0x1000 + StoreField v55, :@formatted@0x1001, v15 + WriteBarrier v55, v15 + v58:CShape[0x1002] = Const CShape(0x1002) + StoreField v55, :_shape_id@0x1003, v58 + v43:Class[VMFrozenCore] = Const Value(VALUE(0x1008)) PatchPoint MethodRedefined(Class@0x1010, lambda@0x1018, cme:0x1020) PatchPoint NoSingletonClass(Class@0x1010) - v65:BasicObject = CCallWithFrame v45, :RubyVM::FrozenCore.lambda@0x1048, block=0x1050 - v48:BasicObject = GetLocal :a, l0, EP@6 - v49:BasicObject = GetLocal :_b, l0, EP@5 - v50:BasicObject = GetLocal :_c, l0, EP@4 - v51:BasicObject = GetLocal :formatted, l0, EP@3 + v63:BasicObject = CCallWithFrame v43, :RubyVM::FrozenCore.lambda@0x1048, block=0x1050 + v46:BasicObject = GetLocal :a, l0, EP@6 + v47:BasicObject = GetLocal :_b, l0, EP@5 + v48:BasicObject = GetLocal :_c, l0, EP@4 + v49:BasicObject = GetLocal :formatted, l0, EP@3 CheckInterrupts - Return v65 + Return v63 "); } diff --git a/zjit/src/hir/tests.rs b/zjit/src/hir/tests.rs index f67874fad7a832..9810e48145c16d 100644 --- a/zjit/src/hir/tests.rs +++ b/zjit/src/hir/tests.rs @@ -1069,17 +1069,14 @@ pub mod hir_build_tests { v18:CBool = Test v11 IfFalse v18, bb3(v10, v11, v12) v22:Fixnum[3] = Const Value(3) - PatchPoint NoEPEscape(test) CheckInterrupts Jump bb4(v10, v11, v22) - bb3(v29:BasicObject, v30:BasicObject, v31:NilClass): - v35:Fixnum[4] = Const Value(4) - PatchPoint NoEPEscape(test) - Jump bb4(v29, v30, v35) - bb4(v40:BasicObject, v41:BasicObject, v42:Fixnum): - PatchPoint NoEPEscape(test) + bb3(v27:BasicObject, v28:BasicObject, v29:NilClass): + v33:Fixnum[4] = Const Value(4) + Jump bb4(v27, v28, v33) + bb4(v36:BasicObject, v37:BasicObject, v38:Fixnum): CheckInterrupts - Return v42 + Return v38 "); } @@ -1366,23 +1363,20 @@ pub mod hir_build_tests { CheckInterrupts Jump bb4(v10, v16, v20) bb4(v26:BasicObject, v27:BasicObject, v28:BasicObject): - PatchPoint NoEPEscape(test) - v34:Fixnum[0] = Const Value(0) - v37:BasicObject = SendWithoutBlock v28, :>, v34 # SendFallbackReason: Uncategorized(opt_gt) + v32:Fixnum[0] = Const Value(0) + v35:BasicObject = SendWithoutBlock v28, :>, v32 # SendFallbackReason: Uncategorized(opt_gt) CheckInterrupts - v40:CBool = Test v37 - IfTrue v40, bb3(v26, v27, v28) - v43:NilClass = Const Value(nil) - PatchPoint NoEPEscape(test) + v38:CBool = Test v35 + IfTrue v38, bb3(v26, v27, v28) + v41:NilClass = Const Value(nil) CheckInterrupts Return v27 - bb3(v53:BasicObject, v54:BasicObject, v55:BasicObject): - PatchPoint NoEPEscape(test) - v62:Fixnum[1] = Const Value(1) - v65:BasicObject = SendWithoutBlock v54, :+, v62 # SendFallbackReason: Uncategorized(opt_plus) - v70:Fixnum[1] = Const Value(1) - v73:BasicObject = SendWithoutBlock v55, :-, v70 # SendFallbackReason: Uncategorized(opt_minus) - Jump bb4(v53, v65, v73) + bb3(v49:BasicObject, v50:BasicObject, v51:BasicObject): + v56:Fixnum[1] = Const Value(1) + v59:BasicObject = SendWithoutBlock v50, :+, v56 # SendFallbackReason: Uncategorized(opt_plus) + v64:Fixnum[1] = Const Value(1) + v67:BasicObject = SendWithoutBlock v51, :-, v64 # SendFallbackReason: Uncategorized(opt_minus) + Jump bb4(v49, v59, v67) "); } @@ -3064,15 +3058,13 @@ pub mod hir_build_tests { CheckInterrupts v35:CBool[true] = Test v32 IfFalse v35, bb3(v16, v17, v18, v19, v20, v25) - PatchPoint NoEPEscape(open) - v42:BasicObject = InvokeBlock, v25 # SendFallbackReason: Uncategorized(invokeblock) - v45:BasicObject = InvokeBuiltin dir_s_close, v16, v25 + v40:BasicObject = InvokeBlock, v25 # SendFallbackReason: Uncategorized(invokeblock) + v43:BasicObject = InvokeBuiltin dir_s_close, v16, v25 CheckInterrupts - Return v42 - bb3(v51, v52, v53, v54, v55, v56): - PatchPoint NoEPEscape(open) + Return v40 + bb3(v49, v50, v51, v52, v53, v54): CheckInterrupts - Return v56 + Return v54 "); } @@ -3548,12 +3540,10 @@ pub mod hir_build_tests { v22:Fixnum[1] = Const Value(1) v24:Fixnum[1] = Const Value(1) v27:BasicObject = SendWithoutBlock v22, :+, v24 # SendFallbackReason: Uncategorized(opt_plus) - PatchPoint NoEPEscape(test) Jump bb3(v10, v27, v12) - bb3(v32:BasicObject, v33:BasicObject, v34:BasicObject): - PatchPoint NoEPEscape(test) + bb3(v30:BasicObject, v31:BasicObject, v32:BasicObject): CheckInterrupts - Return v33 + Return v31 "); } From 3c4cda10eb80fa38f2b27d4774e3e3e82bf190c9 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Wed, 24 Dec 2025 16:06:50 -0800 Subject: [PATCH 13/13] [DOC] Add back Rust 1.85.0 requirement to NEWS.md (#15728) * [DOC] Add back Rust 1.85.0 requirement to NEWS.md Addresses k0kubun's review in https://github.com/ruby/ruby/pull/15711#issuecomment-3690541074 NEWS.md serves both CRuby developers as well as end-users. As the release date closes in, it probably gets seen by more users than core developers (on the blog for example). Most users probably don't build Ruby by hand, and instead that is abstracted through tools like ruby-install or a package manager. For some users these tools may install pre-built binaries where they exist, in which case the Rust requirement doesn't apply. In other instances, the tools merely automate the build, in which case the correct rustc version is required to enable support. It is also a little confusing to talk about "enabling support for the JIT during the build" vs "enabling the JIT at runtime". This copy attempts to balance all of the above and hopefully gets the correct points across all intended audiences. * Apply suggestion from k0kubun Co-authored-by: Takashi Kokubun --------- Co-authored-by: Takashi Kokubun --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 877b849ab148ae..991f34965fe1fc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -570,7 +570,8 @@ A lot of work has gone into making Ractors more stable, performant, and usable. * ZJIT * Introduce an [experimental method-based JIT compiler](https://docs.ruby-lang.org/en/master/jit/zjit_md.html). - To enable ZJIT on supported platforms, supply the `--zjit` option or call `RubyVM::ZJIT.enable` at runtime. + Where available, ZJIT can be enabled at runtime with the `--zjit` option or by calling `RubyVM::ZJIT.enable`. + When building Ruby, Rust 1.85.0 or later is required to include ZJIT support. * As of Ruby 4.0.0, ZJIT is faster than the interpreter, but not yet as fast as YJIT. We encourage experimentation with ZJIT, but advise against deploying it in production for now. * Our goal is to make ZJIT faster than YJIT and production-ready in Ruby 4.1.