Skip to content

Commit d02c971

Browse files
authored
Stop bumping RUBY_PATCHLEVEL in release versions (ruby#15502)
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
1 parent 89e09e4 commit d02c971

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

test/ruby/test_rubyoptions.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,4 +1319,10 @@ def test_free_at_exit_env_var
13191319
def test_toplevel_ruby
13201320
assert_instance_of Module, ::Ruby
13211321
end
1322+
1323+
def test_ruby_patchlevel
1324+
# We stopped bumping RUBY_PATCHLEVEL at Ruby 4.0.0.
1325+
# Released versions have RUBY_PATCHLEVEL 0, and un-released versions have -1.
1326+
assert_include [-1, 0], RUBY_PATCHLEVEL
1327+
end
13221328
end

tool/merger.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def version_up(teeny: false)
6565
if teeny
6666
v[2].succ!
6767
end
68-
if pl != '-1' # trunk does not have patchlevel
68+
# We stopped bumping RUBY_PATCHLEVEL at Ruby 4.0.0.
69+
if Integer(v[0]) <= 3
6970
pl.succ!
7071
end
7172

0 commit comments

Comments
 (0)