[ruby/fileutils] Reduce global variables
https://github.com/ruby/fileutils/commit/ba81f024cf
This commit is contained in:
parent
06c35cfa65
commit
d5355123cc
@ -1520,14 +1520,14 @@ module FileUtils
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
$fileutils_rb_have_lchmod = nil
|
@@fileutils_rb_have_lchmod = nil
|
||||||
|
|
||||||
def have_lchmod?
|
def have_lchmod?
|
||||||
# This is not MT-safe, but it does not matter.
|
# This is not MT-safe, but it does not matter.
|
||||||
if $fileutils_rb_have_lchmod == nil
|
if @@fileutils_rb_have_lchmod == nil
|
||||||
$fileutils_rb_have_lchmod = check_have_lchmod?
|
@@fileutils_rb_have_lchmod = check_have_lchmod?
|
||||||
end
|
end
|
||||||
$fileutils_rb_have_lchmod
|
@@fileutils_rb_have_lchmod
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_have_lchmod?
|
def check_have_lchmod?
|
||||||
@ -1538,14 +1538,14 @@ module FileUtils
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
$fileutils_rb_have_lchown = nil
|
@@fileutils_rb_have_lchown = nil
|
||||||
|
|
||||||
def have_lchown?
|
def have_lchown?
|
||||||
# This is not MT-safe, but it does not matter.
|
# This is not MT-safe, but it does not matter.
|
||||||
if $fileutils_rb_have_lchown == nil
|
if @@fileutils_rb_have_lchown == nil
|
||||||
$fileutils_rb_have_lchown = check_have_lchown?
|
@@fileutils_rb_have_lchown = check_have_lchown?
|
||||||
end
|
end
|
||||||
$fileutils_rb_have_lchown
|
@@fileutils_rb_have_lchown
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_have_lchown?
|
def check_have_lchown?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user