aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathname
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 14:22:12 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 14:22:12 +0000
commit206ce713f7ce0659052bc5e8c72fecb870f94540 (patch)
tree6e05cebb466091729907036778680126568f1fac /test/pathname
parent7a7a480f7d924d0a6d8768a9615e8df45d6baa32 (diff)
downloadruby-206ce713f7ce0659052bc5e8c72fecb870f94540.tar.gz
test_pathname.rb#test_open should care about umask
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname')
-rw-r--r--test/pathname/test_pathname.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index d0c2aa18ca..caaa788f08 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -912,11 +912,11 @@ class TestPathname < Test::Unit::TestCase
}
Pathname("b").open("w", 0444) {|f| f.write "def" }
- assert_equal(0444, File.stat("b").mode & 0777)
+ assert_equal(0444 & ~File.umask, File.stat("b").mode & 0777)
assert_equal("def", File.read("b"))
Pathname("c").open("w", 0444, {}) {|f| f.write "ghi" }
- assert_equal(0444, File.stat("c").mode & 0777)
+ assert_equal(0444 & ~File.umask, File.stat("c").mode & 0777)
assert_equal("ghi", File.read("c"))
g = path.open