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

ruby-changes:34112

From: akr <ko1@a...>
Date: Wed, 28 May 2014 01:17:20 +0900 (JST)
Subject: [ruby-changes:34112] akr:r46193 (trunk): Use Tempfile#close!.

akr	2014-05-28 01:17:13 +0900 (Wed, 28 May 2014)

  New Revision: 46193

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

  Log:
    Use Tempfile#close!.

  Modified files:
    trunk/test/cgi/test_cgi_multipart.rb
Index: test/cgi/test_cgi_multipart.rb
===================================================================
--- test/cgi/test_cgi_multipart.rb	(revision 46192)
+++ test/cgi/test_cgi_multipart.rb	(revision 46193)
@@ -118,7 +118,7 @@ class CGIMultipartTest < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_multipart.rb#L118
     $stdin.close() if $stdin.is_a?(Tempfile)
     $stdin = STDIN
     @tempfiles.each {|t|
-      t.close(true)
+      t.close!
     }
   end
 
@@ -179,7 +179,7 @@ class CGIMultipartTest < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_multipart.rb#L179
       cgi.params.each {|name, vals|
         vals.each {|val|
           if val.kind_of?(Tempfile) && val.path
-            val.close(true)
+            val.close!
           end
         }
       }
@@ -330,7 +330,7 @@ class CGIMultipartTest < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_multipart.rb#L330
     cgi = RUBY_VERSION>="1.9" ? CGI.new(:accept_charset=>"UTF-8") : CGI.new
     assert_equal(cgi['foo'], 'bar')
     assert_equal(cgi['file'].read, 'b'*10134)
-    cgi['file'].close(true) if cgi['file'].kind_of? Tempfile
+    cgi['file'].close! if cgi['file'].kind_of? Tempfile
   end
 
   def test_cgi_multipart_without_tempfile

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

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