diff options
author | Vít Ondruch <vondruch@redhat.com> | 2019-10-11 17:56:28 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-26 11:04:52 +0900 |
commit | e087b029e54776afe2b120974932dd707fee6874 (patch) | |
tree | 92a18980aa0ea7b3465b33a3a0b9ed5a2f37d16d /tool | |
parent | c9fab1ac06b83679b265c011481c80387c008735 (diff) |
Use class variable `@src_dir` instead of local `path`.
The local `path` variable does not provide any additional value and was
kept around just for clarity for easier review of the `extrac_files`
method move.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2515
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index cbc71806f6..b6e75f9a97 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -719,12 +719,11 @@ module RbInstall end def extract_files(destination_dir, pattern = "*") - path = @src_dir - return if path == destination_dir + return if @src_dir == destination_dir File.chmod(0700, destination_dir) mode = pattern == "bin/*" ? prog_mode : data_mode spec.files.each do |f| - src = File.join(path, f) + src = File.join(@src_dir, f) dest = File.join(without_destdir(destination_dir), f) makedirs(dest[/.*(?=\/)/m]) install src, dest, :mode => mode |