diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tool/downloader.rb | 4 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Wed Nov 19 18:12:17 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * tool/downloader.rb (RubyGems.download): Don't download gem if the + version is already downloaded. A gem file is versioned and + it must be identical if the version is the same. + Wed Nov 19 17:59:25 2014 NARUSE, Yui <naruse@ruby-lang.org> * common.mk (ext/ripper/ripper.c): pass build directory as VPATH. diff --git a/tool/downloader.rb b/tool/downloader.rb index 3b39f45ed0..1149424881 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -9,6 +9,10 @@ class Downloader class RubyGems < self def self.download(name, *rest) + if File.exist?(name) + $stdout.puts "#{name} already exists" + return + end super("https://rubygems.org/downloads/#{name}", name, *rest) end end |