From d5355123ccf41c05766b1d58b75419bece61b8ea Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Sat, 24 Aug 2019 21:19:31 +0900 Subject: [ruby/fileutils] Reduce global variables https://github.com/ruby/fileutils/commit/ba81f024cf --- lib/fileutils.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/fileutils.rb') 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? -- cgit v1.2.3