From abb743884990b385b197eb765dcab68f78bddd2d Mon Sep 17 00:00:00 2001 From: duerst Date: Mon, 16 Jul 2018 10:20:24 +0000 Subject: tool/downloader.rb: * remove initial "./" from destdir to make downloading ./enc/unicode/data/11.0.0/ucd/auxiliary/GraphemeBreakProperty.txt work properly * tweak a comment git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/downloader.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tool') diff --git a/tool/downloader.rb b/tool/downloader.rb index 13d6aa0e50..c832b3ca9b 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -11,8 +11,8 @@ rescue LoadError else https = 'https' - # open-uri of ruby 2.2.0 accept an array of PEMs as ssl_ca_cert, but old - # versions are not. so, patching OpenSSL::X509::Store#add_file instead. + # open-uri of ruby 2.2.0 accepts an array of PEMs as ssl_ca_cert, but old + # versions do not. so, patching OpenSSL::X509::Store#add_file instead. class OpenSSL::X509::Store alias orig_add_file add_file def add_file(pems) @@ -329,8 +329,9 @@ if $0 == __FILE__ dir = destdir if prefix name = name.sub(/\A\.\//, '') - if name.start_with?(destdir+"/") - name = name[(destdir.size+1)..-1] + destdir2 = destdir.sub(/\A\.\//, '') + if name.start_with?(destdir2+"/") + name = name[(destdir2.size+1)..-1] if (dir = File.dirname(name)) == '.' dir = destdir else -- cgit v1.2.3