class Gem::Commands::UpdateCommand

def highest_remote_version spec # :nodoc:

:nodoc:
def highest_remote_version spec # :nodoc:
  spec_tuples = fetch_remote_gems spec
  matching_gems = spec_tuples.select do |g,_|
    g.name == spec.name and g.match_platform?
  end
  highest_remote_gem = matching_gems.max_by { |g,_| g.version }
  highest_remote_gem ||= [Gem::NameTuple.null]
  highest_remote_gem.first.version
end