summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVít Ondruch <vondruch@redhat.com>2019-10-01 12:39:31 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-26 11:04:52 +0900
commitc9fab1ac06b83679b265c011481c80387c008735 (patch)
treecffaa494db4f03214bb0136fa44bfa79c6e79473
parent6609940a5e5c46dcc96d2bd3c228a951df6240ce (diff)
Use local `{dir,prog,data}_mode` variables instead of globals.
This just gets the `RbInstall::DirPackage` closer by functionality to `Gem::Package`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2515
-rwxr-xr-xtool/rbinstall.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index fbf818fe34..cbc71806f6 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -722,14 +722,14 @@ module RbInstall
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