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 | e74e31560b6588b62884b05d537080b19e5d3ea3 (patch) | |
tree | 5753afcc8feecb6da63b8317cca42a5b32cccee3 /test | |
parent | 2b1fcfb9d3b31d9228f21763740fba06cee1ce23 (diff) | |
download | ruby-e74e31560b6588b62884b05d537080b19e5d3ea3.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 |