[前][次][番号順一覧][スレッド一覧]

ruby-changes:57976

From: Kazuhiro <ko1@a...>
Date: Fri, 27 Sep 2019 13:12:57 +0900 (JST)
Subject: [ruby-changes:57976] d5355123cc (master): [ruby/fileutils] Reduce global variables

https://git.ruby-lang.org/ruby.git/commit/?id=d5355123cc

From d5355123ccf41c05766b1d58b75419bece61b8ea Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Sat, 24 Aug 2019 21:19:31 +0900
Subject: [ruby/fileutils] Reduce global variables

https://github.com/ruby/fileutils/commit/ba81f024cf

diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 27524fc..8a1b8a8 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1520,14 +1520,14 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1520
 
     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 https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1538
       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 v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]