ruby-changes:46203
From: nobu <ko1@a...>
Date: Tue, 11 Apr 2017 21:20:24 +0900 (JST)
Subject: [ruby-changes:46203] nobu:r58318 (trunk): Install only files explicitly referenced by bundled gems.
nobu 2017-04-11 21:20:21 +0900 (Tue, 11 Apr 2017) New Revision: 58318 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58318 Log: Install only files explicitly referenced by bundled gems. [Bug #13417] [Fix GH-1580] Author: V?\195?\173t Ondruch <vondruch@r...> Modified files: trunk/tool/rbinstall.rb Index: tool/rbinstall.rb =================================================================== --- tool/rbinstall.rb (revision 58317) +++ tool/rbinstall.rb (revision 58318) @@ -678,10 +678,12 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L678 return if path == destination_dir File.chmod(0700, destination_dir) mode = pattern == "bin/*" ? $script_mode : $data_mode - install_recursive(path, without_destdir(destination_dir), - :glob => pattern, - :no_install => "*.gemspec", - :mode => mode) + spec.files.each do |f| + src = File.join(path, f) + dest = File.join(without_destdir(destination_dir), f) + makedirs(dest[/.*(?=\/)/m]) + install src, dest, :mode => mode + end File.chmod($dir_mode, destination_dir) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/