diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 14:22:12 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 14:22:12 +0000 |
commit | 3e5a25210e27ffda6e8c1e4b8c5494b1fcbb8e3e (patch) | |
tree | 6e05cebb466091729907036778680126568f1fac /test/pathname/test_pathname.rb | |
parent | 76897dbabb421cca2a0d4f79bee4f35a1aad58a1 (diff) | |
download | ruby-3e5a25210e27ffda6e8c1e4b8c5494b1fcbb8e3e.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/test_pathname.rb')
-rw-r--r-- | test/pathname/test_pathname.rb | 4 |
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 |