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

ruby-changes:45573

From: nobu <ko1@a...>
Date: Fri, 17 Feb 2017 19:22:15 +0900 (JST)
Subject: [ruby-changes:45573] nobu:r57646 (trunk): test_fileutils.rb: workaround for Cygwin

nobu	2017-02-17 19:22:10 +0900 (Fri, 17 Feb 2017)

  New Revision: 57646

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57646

  Log:
    test_fileutils.rb: workaround for Cygwin
    
    * test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin
      has some different conditions for privilege.

  Modified files:
    trunk/test/fileutils/test_fileutils.rb
Index: test/fileutils/test_fileutils.rb
===================================================================
--- test/fileutils/test_fileutils.rb	(revision 57645)
+++ test/fileutils/test_fileutils.rb	(revision 57646)
@@ -75,6 +75,10 @@ class TestFileUtils < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L75
     end
 
     def root_in_posix?
+      if /cygwin/ =~ RUBY_PLATFORM
+        # FIXME: privilege if groups include root user?
+        return Process.groups.include?(0)
+      end
       if Process.respond_to?('uid')
         return Process.uid == 0
       else

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

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