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

ruby-changes:39341

From: naruse <ko1@a...>
Date: Wed, 29 Jul 2015 13:10:38 +0900 (JST)
Subject: [ruby-changes:39341] naruse:r51422 (trunk): open the path instead of tempfile object

naruse	2015-07-29 13:10:19 +0900 (Wed, 29 Jul 2015)

  New Revision: 51422

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

  Log:
    open the path instead of tempfile object

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 51421)
+++ test/ruby/test_io.rb	(revision 51422)
@@ -3232,21 +3232,21 @@ End https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L3232
 
   def test_open_flag
     make_tempfile do |t|
-      assert_raise(Errno::EEXIST){ open(t, File::WRONLY|File::CREAT, flags: File::EXCL){} }
-      assert_raise(Errno::EEXIST){ open(t, 'w', flags: File::EXCL){} }
-      assert_raise(Errno::EEXIST){ open(t, mode: 'w', flags: File::EXCL){} }
+      assert_raise(Errno::EEXIST){ open(t.path, File::WRONLY|File::CREAT, flags: File::EXCL){} }
+      assert_raise(Errno::EEXIST){ open(t.path, 'w', flags: File::EXCL){} }
+      assert_raise(Errno::EEXIST){ open(t.path, mode: 'w', flags: File::EXCL){} }
     end
   end
 
   def test_open_flag_binar
     make_tempfile do |t|
-      open(t, File::RDONLY, flags: File::BINARY) do |f|
+      open(t.path, File::RDONLY, flags: File::BINARY) do |f|
         assert_equal true, f.binmode
       end
-      open(t, 'r', flags: File::BINARY) do |f|
+      open(t.path, 'r', flags: File::BINARY) do |f|
         assert_equal true, f.binmode
       end
-      open(t, mode: 'r', flags: File::BINARY) do |f|
+      open(t.path, mode: 'r', flags: File::BINARY) do |f|
         assert_equal true, f.binmode
       end
     end

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

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