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

ruby-changes:60192

From: V=C3=ADt <ko1@a...>
Date: Wed, 26 Feb 2020 11:05:12 +0900 (JST)
Subject: [ruby-changes:60192] c9fab1ac06 (master): Use local `{dir, prog, data}_mode` variables instead of globals.

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

From c9fab1ac06b83679b265c011481c80387c008735 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@r...>
Date: Tue, 1 Oct 2019 12:39:31 +0200
Subject: Use local `{dir,prog,data}_mode` variables instead of globals.

This just gets the `RbInstall::DirPackage` closer by functionality to
`Gem::Package`.

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index fbf818f..cbc7180 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -722,14 +722,14 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L722
       path = @src_dir
       return if path == destination_dir
       File.chmod(0700, destination_dir)
-      mode = pattern == "bin/*" ? $script_mode : $data_mode
+      mode = pattern == "bin/*" ? prog_mode : data_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)
+      File.chmod(dir_mode, destination_dir)
     end
   end
 
-- 
cgit v0.10.2


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

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