1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_fileutils.rb: workaround for Cygwin

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-02-17 10:22:10 +00:00
parent 1ac36ecf00
commit c85a58d512

View file

@ -75,6 +75,10 @@ class TestFileUtils < Test::Unit::TestCase
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