[rubygems/rubygems] Forbid downgrading past the originally shipped version on Ruby 3.1

https://github.com/rubygems/rubygems/commit/68bef90339
This commit is contained in:
David Rodríguez 2022-01-23 05:25:12 +01:00 committed by git
parent 663833b08f
commit 4317a6750d
1 changed files with 3 additions and 1 deletions

View File

@ -336,7 +336,9 @@ command to remove old versions.
#
def oldest_supported_version
@oldest_supported_version ||=
if Gem.ruby_version > Gem::Version.new("3.0.a")
if Gem.ruby_version > Gem::Version.new("3.1.a")
Gem::Version.new("3.3.3")
elsif Gem.ruby_version > Gem::Version.new("3.0.a")
Gem::Version.new("3.2.3")
elsif Gem.ruby_version > Gem::Version.new("2.7.a")
Gem::Version.new("3.1.2")