diff options
author | Vít Ondruch <vondruch@redhat.com> | 2019-10-15 15:15:25 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-26 11:04:52 +0900 |
commit | 9d6d531527f8ca0d2f40ab99f6a5989934b9bd02 (patch) | |
tree | 4735f8cc1e14f2f9f765b8810402379ee3d0f87e /tool | |
parent | b8a8fdba637589ff17f98cee4ea955667e3f0b1b (diff) |
Cache destination dir.
It is not necessary to strip the `destdir` prefix every iteration, when
it can be done just once.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2515
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 5423920da7..333369293a 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -722,9 +722,10 @@ module RbInstall return if @src_dir == destination_dir File.chmod(0700, destination_dir) mode = pattern == File.join(spec.bindir, '*') ? prog_mode : data_mode + destdir = without_destdir(destination_dir) spec.files.each do |f| src = File.join(@src_dir, f) - dest = File.join(without_destdir(destination_dir), f) + dest = File.join(destdir, f) makedirs(dest[/.*(?=\/)/m]) install src, dest, :mode => mode end |