aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-11 12:20:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-11 12:20:21 +0000
commit87ec2856268df16734c95253dda552794f96b1b4 (patch)
treec8b1dda6fe47ecb0d73d69881d431da91e989246 /tool
parent818dd47a41fa1c0bbde2b83c9aae2ee018f24f21 (diff)
downloadruby-87ec2856268df16734c95253dda552794f96b1b4.tar.gz
Install only files explicitly referenced by bundled gems.
[Bug #13417] [Fix GH-1580] Author: Vít Ondruch <vondruch@redhat.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb10
1 files changed, 6 insertions, 4 deletions
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