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#which_to_update
which_to_update(highest_installed_gems, gem_names, system = false)
lib/rubygems/commands/update_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/commands/update_command.rb, line 304
def which_to_update(highest_installed_gems, gem_names, system = false)
result = []
highest_installed_gems.each do |l_name, l_spec|
next if not gem_names.empty? and
gem_names.none? {|name| name == l_spec.name }
highest_remote_tup = highest_remote_name_tuple l_spec
highest_remote_ver = highest_remote_tup.version
highest_installed_ver = l_spec.version
if system or (highest_installed_ver < highest_remote_ver)
result << Gem::NameTuple.new(l_spec.name, [highest_installed_ver, highest_remote_ver].max, highest_remote_tup.platform)
end
end
result
end
No documentation available