summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_multipart.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/cgi/test_cgi_multipart.rb')
-rw-r--r--test/cgi/test_cgi_multipart.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index ea40535..627f166 100644
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -118,7 +118,7 @@ class CGIMultipartTest < Test::Unit::TestCase
$stdin.close() if $stdin.is_a?(Tempfile)
$stdin = STDIN
@tempfiles.each {|t|
- t.unlink
+ t.close(true)
}
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.unlink
+ val.close(true)
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'].unlink if cgi['file'].kind_of? Tempfile
+ cgi['file'].close(true) if cgi['file'].kind_of? Tempfile
end
def test_cgi_multipart_without_tempfile