summaryrefslogtreecommitdiff
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-24 21:19:31 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-27 11:39:02 +0900
commitd5355123ccf41c05766b1d58b75419bece61b8ea (patch)
tree6e4d91917c1bd7f420e2456e36367b42b42d719a /lib/fileutils.rb
parent06c35cfa65ed5e023bb8b82af93a3d711e550913 (diff)
[ruby/fileutils] Reduce global variables
https://github.com/ruby/fileutils/commit/ba81f024cf
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 27524fcc6a..8a1b8a826b 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1520,14 +1520,14 @@ module FileUtils
private
- $fileutils_rb_have_lchmod = nil
+ @@fileutils_rb_have_lchmod = nil
def have_lchmod?
# This is not MT-safe, but it does not matter.
- if $fileutils_rb_have_lchmod == nil
- $fileutils_rb_have_lchmod = check_have_lchmod?
+ if @@fileutils_rb_have_lchmod == nil
+ @@fileutils_rb_have_lchmod = check_have_lchmod?
end
- $fileutils_rb_have_lchmod
+ @@fileutils_rb_have_lchmod
end
def check_have_lchmod?
@@ -1538,14 +1538,14 @@ module FileUtils
return false
end
- $fileutils_rb_have_lchown = nil
+ @@fileutils_rb_have_lchown = nil
def have_lchown?
# This is not MT-safe, but it does not matter.
- if $fileutils_rb_have_lchown == nil
- $fileutils_rb_have_lchown = check_have_lchown?
+ if @@fileutils_rb_have_lchown == nil
+ @@fileutils_rb_have_lchown = check_have_lchown?
end
- $fileutils_rb_have_lchown
+ @@fileutils_rb_have_lchown
end
def check_have_lchown?