summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-10 23:18:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-10 23:18:44 +0900
commita886d5cb79e2440eb6cf422723e08447ee4735db (patch)
tree2001c479f64c8a40426f362449fbc6e3f9c70e5d
parentc144d7215b3444fa36d28d540b60170a5b30743d (diff)
downloadruby-a886d5cb79e2440eb6cf422723e08447ee4735db.tar.gz
test/ruby/test_file_exhaustive.rb: check the owner of the root directory
The root directory may be owned by the current user, for example, in chroot environment.
-rw-r--r--test/ruby/test_file_exhaustive.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 2a5a860cf8..6b80b82389 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -70,7 +70,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def notownedfile
return @notownedfile if defined? @notownedfile
- if Process.euid != 0
+ if Process.euid != File.stat("/").uid
@notownedfile = '/'
else
@notownedfile = nil