diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-17 10:22:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-17 10:22:10 +0000 |
commit | c85a58d51242a2dca9b3e11997d5ebd1c204beab (patch) | |
tree | 5753afcc8feecb6da63b8317cca42a5b32cccee3 /test | |
parent | 1ac36ecf0048efd1c19fa5c932b8f3a56bc466d6 (diff) | |
download | ruby-c85a58d51242a2dca9b3e11997d5ebd1c204beab.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 35b3f52cfa..19359e4bdd 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -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 |