1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
duerst 2018-07-16 10:20:24 +00:00
parent e39b2cff8a
commit abb7438849

View file

@ -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