diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-10-10 23:18:44 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-10-10 23:18:44 +0900 |
commit | a886d5cb79e2440eb6cf422723e08447ee4735db (patch) | |
tree | 2001c479f64c8a40426f362449fbc6e3f9c70e5d /test/ruby/test_file_exhaustive.rb | |
parent | c144d7215b3444fa36d28d540b60170a5b30743d (diff) | |
download | ruby-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.
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 2 |
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 |