[前][次][番号順一覧][スレッド一覧]

ruby-changes:60194

From: V=C3=ADt <ko1@a...>
Date: Wed, 26 Feb 2020 11:05:14 +0900 (JST)
Subject: [ruby-changes:60194] 9d6d531527 (master): Cache destination dir.

https://git.ruby-lang.org/ruby.git/commit/?id=9d6d531527

From 9d6d531527f8ca0d2f40ab99f6a5989934b9bd02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@r...>
Date: Tue, 15 Oct 2019 15:15:25 +0200
Subject: Cache destination dir.

It is not necessary to strip the `destdir` prefix every iteration, when
it can be done just once.

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 5423920..3333692 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -722,9 +722,10 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L722
       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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]