[rubygems/rubygems] Remove unnecessary and out of date ruby version check

We already do this check in `setup.rb` itself, which is run earlier.

https://github.com/rubygems/rubygems/commit/160cc3f1c5
This commit is contained in:
David Rodríguez 2024-11-22 11:18:52 +01:00 committed by git
parent d2acc71d32
commit 4e6ada3ae4

View File

@ -107,15 +107,6 @@ class Gem::Commands::SetupCommand < Gem::Command
@verbose = nil
end
def check_ruby_version
required_version = Gem::Requirement.new ">= 2.6.0"
unless required_version.satisfied_by? Gem.ruby_version
alert_error "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
terminate_interaction 1
end
end
def defaults_str # :nodoc:
"--format-executable --document ri --regenerate-binstubs"
end
@ -148,8 +139,6 @@ By default, this RubyGems will install gem as:
def execute
@verbose = Gem.configuration.really_verbose
check_ruby_version
require "fileutils"
if Gem.configuration.really_verbose
extend FileUtils::Verbose