From 7965327d1380f4fe7d7bc3f99545fe6581e22ff6 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 11 Apr 2017 12:20:21 +0000 Subject: Install only files explicitly referenced by bundled gems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Bug #13417] [Fix GH-1580] Author: Vít Ondruch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/rbinstall.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tool') diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index c6f869f88b..4385ec9662 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -678,10 +678,12 @@ module RbInstall 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 -- cgit v1.2.3