mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use Tempfile#close!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
592c6ba3b3
commit
9e9fcfeef4
1 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ class CGIMultipartTest < Test::Unit::TestCase
|
|||
$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::TestCase
|
|||
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::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue