diff options
author | Kazuhiro NISHIYAMA <[email protected]> | 2019-08-24 21:19:31 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2019-09-27 11:39:02 +0900 |
commit | d5355123ccf41c05766b1d58b75419bece61b8ea (patch) | |
tree | 6e4d91917c1bd7f420e2456e36367b42b42d719a /lib/fileutils.rb | |
parent | 06c35cfa65ed5e023bb8b82af93a3d711e550913 (diff) |
[ruby/fileutils] Reduce global variables
https://github.com/ruby/fileutils/commit/ba81f024cf
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r-- | lib/fileutils.rb | 16 |
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? |