diff options
Diffstat (limited to 'lib/rubygems/remote_fetcher.rb')
-rw-r--r-- | lib/rubygems/remote_fetcher.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index 4bb2e3604f..cc3d3cf860 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -294,7 +294,7 @@ class Gem::RemoteFetcher # Downloads +uri+ to +path+ if necessary. If no path is given, it just # passes the data. - def cache_update_path(uri, path = nil) + def cache_update_path uri, path = nil, update = true mtime = path && File.stat(path).mtime rescue nil if mtime && Net::HTTPNotModified === fetch_path(uri, mtime, true) @@ -302,7 +302,7 @@ class Gem::RemoteFetcher else data = fetch_path(uri) - if path + if update and path then open(path, 'wb') do |io| io.write data end |