diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 10:13:50 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 10:13:50 +0000 |
commit | d478c7a7342478847cc1148f4134b5f0db04e1d9 (patch) | |
tree | 3bfca425683a94d1360ecdf5857d741b8eaac213 /lib/rubygems/spec_fetcher.rb | |
parent | 788001a9c8473130bd357846785838045387b060 (diff) | |
download | ruby-d478c7a7342478847cc1148f4134b5f0db04e1d9.tar.gz |
Update to RubyGems 1.3.0 r1891
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/spec_fetcher.rb')
-rw-r--r-- | lib/rubygems/spec_fetcher.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb index 66b4ee36c7..a1fc82ed4f 100644 --- a/lib/rubygems/spec_fetcher.rb +++ b/lib/rubygems/spec_fetcher.rb @@ -167,7 +167,7 @@ class Gem::SpecFetcher if all and @specs.include? source_uri then list[source_uri] = @specs[source_uri] - elsif @latest_specs.include? source_uri then + elsif not all and @latest_specs.include? source_uri then list[source_uri] = @latest_specs[source_uri] else specs = load_specs source_uri, file @@ -182,6 +182,10 @@ class Gem::SpecFetcher list end + ## + # Loads specs in +file+, fetching from +source_uri+ if the on-disk cache is + # out of date. + def load_specs(source_uri, file) file_name = "#{file}.#{Gem.marshal_version}" spec_path = source_uri + "#{file_name}.gz" @@ -192,7 +196,7 @@ class Gem::SpecFetcher if File.exist? local_file then spec_dump = @fetcher.fetch_path spec_path, File.mtime(local_file) - if spec_dump.empty? then + if spec_dump.nil? then spec_dump = Gem.read_binary local_file else loaded = true |