[前][次][番号順一覧][スレッド一覧]

ruby-changes:48168

From: kosaki <ko1@a...>
Date: Sat, 21 Oct 2017 23:22:30 +0900 (JST)
Subject: [ruby-changes:48168] kosaki:r60283 (trunk): test_pathname.rb#test_open should care about umask

kosaki	2017-10-21 23:22:12 +0900 (Sat, 21 Oct 2017)

  New Revision: 60283

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60283

  Log:
    test_pathname.rb#test_open should care about umask

  Modified files:
    trunk/test/pathname/test_pathname.rb
Index: test/pathname/test_pathname.rb
===================================================================
--- test/pathname/test_pathname.rb	(revision 60282)
+++ test/pathname/test_pathname.rb	(revision 60283)
@@ -912,11 +912,11 @@ class TestPathname < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/pathname/test_pathname.rb#L912
       }
 
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]