summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-01-23 05:25:12 +0100
committergit <svn-admin@ruby-lang.org>2022-01-25 01:11:39 +0900
commit4317a6750dceb917ee9c2be7a8191f6bde103f94 (patch)
tree4806f2d574d38c5b2cdc900f1220188759890ba0 /lib/rubygems
parent663833b08fbae8d92cb2245a729312b86aa33a35 (diff)
[rubygems/rubygems] Forbid downgrading past the originally shipped version on Ruby 3.1
https://github.com/rubygems/rubygems/commit/68bef90339
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/commands/update_command.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index ecaf717871..42d6f6046b 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -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")