lib/ruby/shared/rubygems/remote_fetcher.rb
##
# Given a name and requirement, downloads this gem into cache and returns the
# filename. Returns nil if the gem cannot be located.
#--
# Should probably be integrated with #download below, but that will be a
# larger, more emcompassing effort. -erikh
Given a name and requirement, downloads this gem into cache and returns the
filename. Returns nil if the gem cannot be located.

Should probably be integrated with #download below, but that will be a
larger, more emcompassing effort. -erikh
Given a name and requirement downloads this gem into cache and returns the filename . Returns nil if the gem cannot be located . Should probably be integrated with #download below but that will be a larger more emcompassing effort . - erikh
def download_to_cache dependency
    found = Gem::SpecFetcher.fetcher.fetch dependency, true, true,
                                           dependency.prerelease?
    return if found.empty?
    spec, source_uri = found.sort_by { |(s,_)| s.version }.last
    download spec, source_uri
  end
def download_to_cache dependency found = Gem :: SpecFetcher . fetcher . fetch dependency , true , true , dependency . prerelease? return if found . empty? spec , source_uri = found . sort_by { | ( s , _ ) | s . version } . last download spec , source_uri end
Given a name and requirement, downloads this gem into cache and returns the
filename.
Given a name and requirement downloads this gem into cache and returns the filename .
dependency
<not_specific>