From 3d2ee31fdc1917fd754884fc12f71ed2f348d73e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 9 Oct 2025 09:18:39 +0900 Subject: [PATCH 01/14] Check core doc coverage always --- .github/workflows/check_misc.yml | 33 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check_misc.yml b/.github/workflows/check_misc.yml index 1c0120252fdf21..38c23b41107a28 100644 --- a/.github/workflows/check_misc.yml +++ b/.github/workflows/check_misc.yml @@ -60,23 +60,16 @@ jobs: - name: Check if to generate documents id: rdoc run: | - ref=$(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems | awk '{print $4}') - echo ref=$ref >> $GITHUB_OUTPUT - # Generate only when document commit/PR - if: >- - ${{false - || contains(github.event.head_commit.message, '[ruby/rdoc]') - || contains(github.event.head_commit.message, '[DOC]') - || contains(github.event.pull_request.title, '[DOC]') - || contains(github.event.pull_request.labels.*.name, 'Documentation') - }} + set -- $(sed 's/#.*//;/^rdoc /!d' gems/bundled_gems) + { echo version=$2; echo ref=$4; } >> $GITHUB_OUTPUT + echo RDOC='ruby -W0 --disable-gems tool/rdoc-srcdir -q' >> $GITHUB_ENV - name: Checkout rdoc uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: repository: ruby/rdoc ref: ${{ steps.rdoc.outputs.ref }} - path: .bundle/gems/rdoc-0 + path: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }} if: ${{ steps.rdoc.outputs.ref != '' }} - name: Generate rdoc @@ -88,18 +81,26 @@ jobs: bundle config --local path vendor/bundle bundle install --jobs 4 bundle exec rake generate - working-directory: .bundle/gems/rdoc-0 + working-directory: .bundle/gems/rdoc-${{ steps.rdoc.outputs.version }} if: ${{ steps.rdoc.outputs.ref != '' }} + - name: Core docs coverage + run: | + $RDOC -C -x ^ext -x ^lib . + - name: Generate docs id: docs run: | - $RDOC -C -x ^ext -x ^lib . $RDOC --op html . echo htmlout=ruby-html-${GITHUB_SHA:0:10} >> $GITHUB_OUTPUT - env: - RDOC: ruby -W0 --disable-gems tool/rdoc-srcdir -q - if: ${{ steps.rdoc.outcome == 'success' }} + # Generate only when document commit/PR + if: >- + ${{false + || contains(github.event.head_commit.message, '[ruby/rdoc]') + || contains(github.event.head_commit.message, '[DOC]') + || contains(github.event.pull_request.title, '[DOC]') + || contains(github.event.pull_request.labels.*.name, 'Documentation') + }} - name: Upload docs uses: actions/upload-artifact@v4 From 44215c1ad904fecb118a172dd1ffc490de0f44b3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 9 Oct 2025 08:44:06 +0900 Subject: [PATCH 02/14] [DOC] Mark `Namespace` debug methods to be "nodoc" --- namespace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/namespace.c b/namespace.c index 059642dd94c451..6a8f4abc9d87bf 100644 --- a/namespace.c +++ b/namespace.c @@ -986,6 +986,7 @@ rb_f_dump_classext(VALUE recv, VALUE klass) return res; } +/* :nodoc: */ static VALUE rb_namespace_root_p(VALUE namespace) { @@ -993,6 +994,7 @@ rb_namespace_root_p(VALUE namespace) return RBOOL(NAMESPACE_ROOT_P(ns)); } +/* :nodoc: */ static VALUE rb_namespace_main_p(VALUE namespace) { @@ -1000,6 +1002,7 @@ rb_namespace_main_p(VALUE namespace) return RBOOL(NAMESPACE_MAIN_P(ns)); } +/* :nodoc: */ static VALUE rb_namespace_user_p(VALUE namespace) { From 317c9412a003f24d2b4beb07e55b6e07a9f248cc Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 9 Oct 2025 11:40:19 +0900 Subject: [PATCH 03/14] Update bundled gems list as of 2025-10-09 bigdecimal fails test-bundled-gems-spec. --- gems/bundled_gems | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gems/bundled_gems b/gems/bundled_gems index 20f4379dbbb6d7..d8fa9642ce1eb8 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -6,14 +6,14 @@ # - revision: revision in repository-url to test # if `revision` is not given, "v"+`version` or `version` will be used. -minitest 5.25.5 https://github.com/minitest/minitest +minitest 5.26.0 https://github.com/minitest/minitest power_assert 2.0.5 https://github.com/ruby/power_assert f88e406e7c9e0810cc149869582afbae1fb84c4a rake 13.3.0 https://github.com/ruby/rake test-unit 3.7.0 https://github.com/test-unit/test-unit rexml 3.4.4 https://github.com/ruby/rexml rss 0.3.1 https://github.com/ruby/rss net-ftp 0.3.8 https://github.com/ruby/net-ftp -net-imap 0.5.10 https://github.com/ruby/net-imap 71c0288b9a8f78a7125a4ce2980ab421acdf5836 +net-imap 0.5.12 https://github.com/ruby/net-imap net-pop 0.1.2 https://github.com/ruby/net-pop net-smtp 0.5.1 https://github.com/ruby/net-smtp matrix 0.4.3 https://github.com/ruby/matrix From 5de042f4afb040d9760abcd8f0cf45521409b537 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 9 Oct 2025 12:19:00 +0900 Subject: [PATCH 04/14] Revert "[DOC] Fix rendering of $\ in globals.md" This reverts commit 598a8f8914a4f7dd4694963c6de3714f49b3b64e, as RDoc 6.15 handles backslash in backquotes properly, and the previous commit rather rendered an extra backslash. --- doc/globals.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/globals.md b/doc/globals.md index 419dcb3acdfa0e..b9315f5ff975e4 100644 --- a/doc/globals.md +++ b/doc/globals.md @@ -34,10 +34,10 @@ require 'English' ### Separators -| Variable | English | Contains | -|-------------|----------------------------|--------------------------------------------| -| `$/` | `$INPUT_RECORD_SEPARATOR` | Input record separator; initially newline. | -| `$\\\\` | `$OUTPUT_RECORD_SEPARATOR` | Output record separator; initially `nil`. | +| Variable | English | Contains | +|----------|----------------------------|--------------------------------------------| +| `$/` | `$INPUT_RECORD_SEPARATOR` | Input record separator; initially newline. | +| `$\` | `$OUTPUT_RECORD_SEPARATOR` | Output record separator; initially `nil`. | ### Streams @@ -179,7 +179,7 @@ English - `$INPUT_RECORD_SEPARATOR`, `$RS`. Aliased as `$-0`. -### `$\\` (Output Record Separator) +### `$\` (Output Record Separator) An output record separator, initially `nil`. From 6922e969f1441ded72d1595397ae50687944827d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:07:11 -0700 Subject: [PATCH 05/14] Allow test-tool to use bundled gems in child processes (#14794) --- tool/test/init.rb | 12 ++++++++++-- tool/test/test_commit_email.rb | 12 ++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/tool/test/init.rb b/tool/test/init.rb index 3a1143d01db281..3fd1419a9c85ff 100644 --- a/tool/test/init.rb +++ b/tool/test/init.rb @@ -1,7 +1,15 @@ -# This file includes the settings for "make test-all". +# This file includes the settings for "make test-all" and "make test-tool". # Note that this file is loaded not only by test/runner.rb but also by tool/lib/test/unit/parallel.rb. -ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze +# Prevent test-all from using bundled gems +["GEM_HOME", "GEM_PATH"].each do |gem_env| + # Preserve the gem environment prepared by tool/runruby.rb for test-tool, which uses bundled gems. + ENV["BUNDLED_#{gem_env}"] = ENV[gem_env] + + ENV[gem_env] = "".freeze +end +ENV["GEM_SKIP"] = "".freeze + ENV.delete("RUBY_CODESIGN") Warning[:experimental] = false diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 539b0b071cd42c..7b258734d05231 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -8,7 +8,7 @@ class TestCommitEmail < Test::Unit::TestCase def setup @ruby = Dir.mktmpdir Dir.chdir(@ruby) do - git('init') + git('init', '--initial-branch=master') git('config', 'user.name', 'Jóhän Grübél') git('config', 'user.email', 'johan@example.com') git('commit', '--allow-empty', '-m', 'New repository initialized by cvs2svn.') @@ -30,11 +30,6 @@ def setup # Just testing an exit status :p # TODO: prepare something in test/fixtures/xxx and test output def test_successful_run - _, err, status = EnvUtil.invoke_ruby([gem_env, '-e', 'require "nkf"'], '', false, true) - unless status.success? - omit "bundled gems are not available: #{err}" - end - Dir.chdir(@ruby) do out, _, status = EnvUtil.invoke_ruby([ { 'SENDMAIL' => @sendmail }.merge!(gem_env), @@ -49,9 +44,10 @@ def test_successful_run private - # Cancel the gem environments set by tool/test/init.rb + # Resurrect the gem environment preserved by tool/test/init.rb. + # This should work as long as you have run `make up` or `make install`. def gem_env - { 'GEM_PATH' => nil, 'GEM_HOME' => nil } + { 'GEM_PATH' => ENV['BUNDLED_GEM_PATH'], 'GEM_HOME' => ENV['BUNDLED_GEM_HOME'] } end def git(*cmd) From 438ea7d69ebc4c485b606e0a8d6cf20a446f2596 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 20:53:31 -0700 Subject: [PATCH 06/14] test_commit_email.rb: Test the content of an email --- tool/test/test_commit_email.rb | 52 +++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 7b258734d05231..38fa60394e1126 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -11,15 +11,16 @@ def setup git('init', '--initial-branch=master') git('config', 'user.name', 'Jóhän Grübél') git('config', 'user.email', 'johan@example.com') - git('commit', '--allow-empty', '-m', 'New repository initialized by cvs2svn.') - git('commit', '--allow-empty', '-m', 'Initial revision') - git('commit', '--allow-empty', '-m', 'version 1.0.0') + env = { 'GIT_AUTHOR_DATE' => '2025-10-08T12:00:00Z' } + git('commit', '--allow-empty', '-m', 'New repository initialized by cvs2svn.', env:) + git('commit', '--allow-empty', '-m', 'Initial revision', env:) + git('commit', '--allow-empty', '-m', 'version 1.0.0', env:) end @sendmail = File.join(Dir.mktmpdir, 'sendmail') File.write(@sendmail, <<~SENDMAIL) #!/usr/bin/env ruby - p ARGV + puts "---" puts STDIN.read SENDMAIL FileUtils.chmod(0755, @sendmail) @@ -27,18 +28,47 @@ def setup @commit_email = File.expand_path('../../tool/commit-email.rb', __dir__) end - # Just testing an exit status :p - # TODO: prepare something in test/fixtures/xxx and test output - def test_successful_run + def test_sendmail_encoding Dir.chdir(@ruby) do + before_rev = git('rev-parse', 'HEAD^').chomp + long_rev = git('rev-parse', 'HEAD').chomp + short_rev = long_rev[0...10] + + env = { + 'SENDMAIL' => @sendmail, + }.merge!(gem_env) out, _, status = EnvUtil.invoke_ruby([ { 'SENDMAIL' => @sendmail }.merge!(gem_env), @commit_email, './', 'cvs-admin@ruby-lang.org', - git('rev-parse', 'HEAD^').chomp, git('rev-parse', 'HEAD').chomp, 'refs/heads/master', + before_rev, long_rev, 'refs/heads/master', '--viewer-uri', 'https://github.com/ruby/ruby/commit/', '--error-to', 'cvs-admin@ruby-lang.org', ], '', true) - assert_true(status.success?, out) + + assert_true(status.success?) + assert_equal(out, <<~EOS) + master: #{short_rev} (Jóhän Grübél) + --- + X-SVN-Author: =?UTF-8?B?SsOzaMOkbiBHcsO8YsOpbA==?= + X-SVN-Repository: XXX + X-SVN-Revision: #{short_rev} + X-SVN-Commit-Id: #{long_rev} + Mime-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + From: =?UTF-8?B?SsOzaMOkbiBHcsO8YsOpbA==?= + To: cvs-admin@ruby-lang.org + Subject: #{short_rev} (master): version 1.0.0 + J=C3=B3h=C3=A4n Gr=C3=BCb=C3=A9l\t2025-10-08 05:00:00 -0700 (Wed, 08 Oct 2= + 025) + + New Revision: #{short_rev} + + https://github.com/ruby/ruby/commit/#{short_rev} + + Log: + version 1.0.0= + EOS end end @@ -50,8 +80,8 @@ def gem_env { 'GEM_PATH' => ENV['BUNDLED_GEM_PATH'], 'GEM_HOME' => ENV['BUNDLED_GEM_HOME'] } end - def git(*cmd) - out, status = Open3.capture2('git', *cmd) + def git(*cmd, env: {}) + out, status = Open3.capture2(env, 'git', *cmd) unless status.success? raise "git #{cmd.shelljoin}\n#{out}" end From 08b34bf9098bc00778752388b895ab898f8db5cb Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:16:02 -0700 Subject: [PATCH 07/14] test_commit_email.rb: Remove an unused local variable --- tool/test/test_commit_email.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 38fa60394e1126..604c18e839af2a 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -34,9 +34,6 @@ def test_sendmail_encoding long_rev = git('rev-parse', 'HEAD').chomp short_rev = long_rev[0...10] - env = { - 'SENDMAIL' => @sendmail, - }.merge!(gem_env) out, _, status = EnvUtil.invoke_ruby([ { 'SENDMAIL' => @sendmail }.merge!(gem_env), @commit_email, './', 'cvs-admin@ruby-lang.org', From 53d1731b68e2b18abd095f8e74dc6de9ab7276e1 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:20:12 -0700 Subject: [PATCH 08/14] commit-email.rb: Remove legacy SVN headers --- tool/commit-email.rb | 40 ++++++++-------------------------- tool/test/test_commit_email.rb | 4 ---- 2 files changed, 9 insertions(+), 35 deletions(-) diff --git a/tool/commit-email.rb b/tool/commit-email.rb index d9f79f41c9982a..f738261dcca6cd 100755 --- a/tool/commit-email.rb +++ b/tool/commit-email.rb @@ -317,20 +317,14 @@ def diff_info(info, uri) end def make_header(to, from, info) - headers = [] - headers << x_author(info) - headers << x_repository(info) - headers << x_revision(info) - headers << x_id(info) - headers << 'Mime-Version: 1.0' - headers << 'Content-Type: text/plain; charset=utf-8' - headers << 'Content-Transfer-Encoding: quoted-printable' - headers << "From: #{from}" - headers << "To: #{to}" - headers << "Subject: #{make_subject(info)}" - headers.find_all do |header| - /\A\s*\z/ !~ header - end.join("\n") + <<~EOS + Mime-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + From: #{from} + To: #{to} + Subject: #{make_subject(info)} + EOS end def make_subject(info) @@ -356,24 +350,8 @@ def make_from(name:, email:) end end - def x_author(info) - "X-SVN-Author: #{b_encode(info.author)}" - end - - def x_repository(info) - 'X-SVN-Repository: XXX' - end - - def x_id(info) - "X-SVN-Commit-Id: #{info.entire_sha256}" - end - - def x_revision(info) - "X-SVN-Revision: #{info.revision}" - end - def make_mail(to, from, info, viewer_uri:) - "#{make_header(to, from, info)}\n#{make_body(info, viewer_uri: viewer_uri)}" + make_header(to, from, info) + make_body(info, viewer_uri: viewer_uri) end end diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 604c18e839af2a..b14bf4e0ce2023 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -46,10 +46,6 @@ def test_sendmail_encoding assert_equal(out, <<~EOS) master: #{short_rev} (Jóhän Grübél) --- - X-SVN-Author: =?UTF-8?B?SsOzaMOkbiBHcsO8YsOpbA==?= - X-SVN-Repository: XXX - X-SVN-Revision: #{short_rev} - X-SVN-Commit-Id: #{long_rev} Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From f8c841dbd532ea2d834c343467c10bbd4d782abb Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:26:54 -0700 Subject: [PATCH 09/14] test_commit_email.rb: Use a fixed timezone --- tool/test/test_commit_email.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index b14bf4e0ce2023..216c0823dc28f2 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -11,7 +11,7 @@ def setup git('init', '--initial-branch=master') git('config', 'user.name', 'Jóhän Grübél') git('config', 'user.email', 'johan@example.com') - env = { 'GIT_AUTHOR_DATE' => '2025-10-08T12:00:00Z' } + env = { 'GIT_AUTHOR_DATE' => '2025-10-08T12:00:00Z', 'TZ' => 'UTC' } git('commit', '--allow-empty', '-m', 'New repository initialized by cvs2svn.', env:) git('commit', '--allow-empty', '-m', 'Initial revision', env:) git('commit', '--allow-empty', '-m', 'version 1.0.0', env:) @@ -52,7 +52,7 @@ def test_sendmail_encoding From: =?UTF-8?B?SsOzaMOkbiBHcsO8YsOpbA==?= To: cvs-admin@ruby-lang.org Subject: #{short_rev} (master): version 1.0.0 - J=C3=B3h=C3=A4n Gr=C3=BCb=C3=A9l\t2025-10-08 05:00:00 -0700 (Wed, 08 Oct 2= + J=C3=B3h=C3=A4n Gr=C3=BCb=C3=A9l\t2025-10-08 12:00:00 +0000 (Wed, 08 Oct 2= 025) New Revision: #{short_rev} From a21cde942c94640f2cc46c2a50d71ec758d70d31 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:31:04 -0700 Subject: [PATCH 10/14] test_commit_email.rb: Fix the timezone for commit-email.rb as well --- tool/test/test_commit_email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 216c0823dc28f2..3d53d957b76e87 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -35,7 +35,7 @@ def test_sendmail_encoding short_rev = long_rev[0...10] out, _, status = EnvUtil.invoke_ruby([ - { 'SENDMAIL' => @sendmail }.merge!(gem_env), + { 'SENDMAIL' => @sendmail, 'TZ' => 'UTC' }.merge!(gem_env), @commit_email, './', 'cvs-admin@ruby-lang.org', before_rev, long_rev, 'refs/heads/master', '--viewer-uri', 'https://github.com/ruby/ruby/commit/', From cd8a4406c1ad6c1fed82acad6899b02478246100 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:32:26 -0700 Subject: [PATCH 11/14] test_commit_email.rb: Skip the sendmail test on Windows We use only ubuntu-latest on post_push.yml anyway. --- tool/test/test_commit_email.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 3d53d957b76e87..58f0537f43eb17 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -29,6 +29,8 @@ def setup end def test_sendmail_encoding + omit 'the sendmail script does not work on windows' if windows? + Dir.chdir(@ruby) do before_rev = git('rev-parse', 'HEAD^').chomp long_rev = git('rev-parse', 'HEAD').chomp From 127318f4cb08dfbf7f515bdec2d1f0192b03296f Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:40:39 -0700 Subject: [PATCH 12/14] test_commit_email.rb: Test the encoding of commit messages --- tool/test/test_commit_email.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 58f0537f43eb17..2e3b444a028257 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -14,7 +14,7 @@ def setup env = { 'GIT_AUTHOR_DATE' => '2025-10-08T12:00:00Z', 'TZ' => 'UTC' } git('commit', '--allow-empty', '-m', 'New repository initialized by cvs2svn.', env:) git('commit', '--allow-empty', '-m', 'Initial revision', env:) - git('commit', '--allow-empty', '-m', 'version 1.0.0', env:) + git('commit', '--allow-empty', '-m', 'version 1.0.0', env:) end @sendmail = File.join(Dir.mktmpdir, 'sendmail') @@ -33,13 +33,13 @@ def test_sendmail_encoding Dir.chdir(@ruby) do before_rev = git('rev-parse', 'HEAD^').chomp - long_rev = git('rev-parse', 'HEAD').chomp - short_rev = long_rev[0...10] + after_rev = git('rev-parse', 'HEAD').chomp + short_rev = after_rev[0...10] out, _, status = EnvUtil.invoke_ruby([ { 'SENDMAIL' => @sendmail, 'TZ' => 'UTC' }.merge!(gem_env), @commit_email, './', 'cvs-admin@ruby-lang.org', - before_rev, long_rev, 'refs/heads/master', + before_rev, after_rev, 'refs/heads/master', '--viewer-uri', 'https://github.com/ruby/ruby/commit/', '--error-to', 'cvs-admin@ruby-lang.org', ], '', true) @@ -53,7 +53,7 @@ def test_sendmail_encoding Content-Transfer-Encoding: quoted-printable From: =?UTF-8?B?SsOzaMOkbiBHcsO8YsOpbA==?= To: cvs-admin@ruby-lang.org - Subject: #{short_rev} (master): version 1.0.0 + Subject: #{short_rev} (master): =?UTF-8?B?dmVyc2lvbuOAgDEuMC4w?= J=C3=B3h=C3=A4n Gr=C3=BCb=C3=A9l\t2025-10-08 12:00:00 +0000 (Wed, 08 Oct 2= 025) @@ -62,7 +62,7 @@ def test_sendmail_encoding https://github.com/ruby/ruby/commit/#{short_rev} Log: - version 1.0.0= + version=E3=80=801.0.0= EOS end end From f01254398931256e62d513a098faa29b1f56f636 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 21:59:02 -0700 Subject: [PATCH 13/14] test_commit_email.rb: Stop testing the un-encoded name Hoping to work around failures on --with-gmp CI: https://github.com/ruby/ruby/actions/runs/18365603616/job/52317792903 --- tool/test/test_commit_email.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index 2e3b444a028257..dcdf014b719481 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -5,6 +5,8 @@ require 'open3' class TestCommitEmail < Test::Unit::TestCase + STDIN_DELIMITER = "---\n" + def setup @ruby = Dir.mktmpdir Dir.chdir(@ruby) do @@ -20,7 +22,7 @@ def setup @sendmail = File.join(Dir.mktmpdir, 'sendmail') File.write(@sendmail, <<~SENDMAIL) #!/usr/bin/env ruby - puts "---" + print #{STDIN_DELIMITER.dump} puts STDIN.read SENDMAIL FileUtils.chmod(0755, @sendmail) @@ -43,11 +45,10 @@ def test_sendmail_encoding '--viewer-uri', 'https://github.com/ruby/ruby/commit/', '--error-to', 'cvs-admin@ruby-lang.org', ], '', true) + stdin = out.split(STDIN_DELIMITER, 2).last assert_true(status.success?) - assert_equal(out, <<~EOS) - master: #{short_rev} (Jóhän Grübél) - --- + assert_equal(stdin, <<~EOS) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From a59c5860a6bdaedc5886ee2627dc5c98d5924af5 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 8 Oct 2025 22:30:42 -0700 Subject: [PATCH 14/14] test_commit_email.rb: Split out as binary for --with-gmp https://github.com/ruby/ruby/actions/runs/18365998053/job/52318906076 --- tool/test/test_commit_email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index dcdf014b719481..efd45022be0bab 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -45,7 +45,7 @@ def test_sendmail_encoding '--viewer-uri', 'https://github.com/ruby/ruby/commit/', '--error-to', 'cvs-admin@ruby-lang.org', ], '', true) - stdin = out.split(STDIN_DELIMITER, 2).last + stdin = out.b.split(STDIN_DELIMITER.b, 2).last.force_encoding('UTF-8') assert_true(status.success?) assert_equal(stdin, <<~EOS)