summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2025-12-11 10:57:06 -0800
committerGitHub <noreply@github.com>2025-12-11 10:57:06 -0800
commitd02c97157476bbd9774f2bf6425a69166b99da1b (patch)
tree43c7b50e285053dfd9dff179edb715e02edac436
parent89e09e4daf1b27c94dbf326c8f5b0b5f864a6e72 (diff)
Stop bumping RUBY_PATCHLEVEL in release versions (#15502)
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
-rw-r--r--test/ruby/test_rubyoptions.rb6
-rwxr-xr-xtool/merger.rb3
2 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index a057e64a4a..2ec6478a7f 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -1319,4 +1319,10 @@ class TestRubyOptions < Test::Unit::TestCase
def test_toplevel_ruby
assert_instance_of Module, ::Ruby
end
+
+ def test_ruby_patchlevel
+ # We stopped bumping RUBY_PATCHLEVEL at Ruby 4.0.0.
+ # Released versions have RUBY_PATCHLEVEL 0, and un-released versions have -1.
+ assert_include [-1, 0], RUBY_PATCHLEVEL
+ end
end
diff --git a/tool/merger.rb b/tool/merger.rb
index 795e97a86e..2eedded66c 100755
--- a/tool/merger.rb
+++ b/tool/merger.rb
@@ -65,7 +65,8 @@ class << Merger = Object.new
if teeny
v[2].succ!
end
- if pl != '-1' # trunk does not have patchlevel
+ # We stopped bumping RUBY_PATCHLEVEL at Ruby 4.0.0.
+ if Integer(v[0]) <= 3
pl.succ!
end