ruby-changes:55241
From: nobu <ko1@a...>
Date: Fri, 5 Apr 2019 21:44:09 +0900 (JST)
Subject: [ruby-changes:55241] nobu:r67448 (trunk): downloader.rb: quote base name
nobu 2019-04-05 21:44:04 +0900 (Fri, 05 Apr 2019) New Revision: 67448 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67448 Log: downloader.rb: quote base name Modified files: trunk/tool/downloader.rb Index: tool/downloader.rb =================================================================== --- tool/downloader.rb (revision 67447) +++ tool/downloader.rb (revision 67448) @@ -88,7 +88,7 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L88 INDEX[:index] = IO.read index_file end file_base = File.basename(name, '.txt') - beta_name = INDEX[:index].match(/#{file_base}(-[0-9.]+d\d+)?\.txt/)[0] + beta_name = INDEX[:index][%/#{Regexp.quote(file_base)}(-[0-9.]+d\d+)?\.txt/] # make sure we always check for new versions of files, # because they can easily change in the beta period super(UNICODE_PUBLIC+name_dir_part+beta_name, name, dir, true, options) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/