From 206ce713f7ce0659052bc5e8c72fecb870f94540 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sat, 21 Oct 2017 14:22:12 +0000 Subject: 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 --- test/pathname/test_pathname.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/pathname') 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 -- cgit v1.2.3