From c9fab1ac06b83679b265c011481c80387c008735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= 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`. --- tool/rbinstall.rb | 4 ++-- 1 file 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 -- cgit v1.2.3