aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_file.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 88b934d8ef..f5a00f9e17 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -268,7 +268,11 @@ class TestFile < Test::Unit::TestCase
realdir = File.realpath(tmpdir)
open(File.join(tmpdir, tst), "w") {}
a = File.join(tmpdir, "x")
- File.symlink(tst, a)
+ begin
+ File.symlink(tst, a)
+ rescue Errno::EACCES
+ skip "need privilege"
+ end
assert_equal(File.join(realdir, tst), File.realpath(a))
File.unlink(a)