summaryrefslogtreecommitdiff
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
commit3e5a25210e27ffda6e8c1e4b8c5494b1fcbb8e3e (patch)
tree6e05cebb466091729907036778680126568f1fac /test/pathname
parent76897dbabb421cca2a0d4f79bee4f35a1aad58a1 (diff)
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