End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Commands::UpdateCommand#rubygems_target_version
rubygems_target_version
lib/rubygems/commands/update_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/commands/update_command.rb, line 207
def rubygems_target_version
version = options[:system]
update_latest = version == true
if update_latest
version = Gem::Version.new Gem::VERSION
requirement = Gem::Requirement.new ">= #{Gem::VERSION}"
else
version = Gem::Version.new version
requirement = Gem::Requirement.new version
end
rubygems_update = Gem::Specification.new
rubygems_update.name = 'rubygems-update'
rubygems_update.version = version
hig = {
'rubygems-update' => rubygems_update,
}
gems_to_update = which_to_update hig, options[:args], :system
up_ver = gems_to_update.first.version
target = if update_latest
up_ver
else
version
end
return target, requirement
end
No documentation available
See also
#preparing_gem_layout_for
#update_gem
#oldest_supported_version
#update_gems
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1