summaryrefslogtreecommitdiff
path: root/lib/cgi/core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/core.rb')
-rw-r--r--lib/cgi/core.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 241f817..76b3a24 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -550,7 +550,7 @@ class CGI
name = $1 || $2 || ''
if body.original_filename.empty?
value=body.read.dup.force_encoding(@accept_charset)
- body.unlink if defined?(Tempfile) && body.kind_of?(Tempfile)
+ body.close(true) if defined?(Tempfile) && body.kind_of?(Tempfile)
(params[name] ||= []) << value
unless value.valid_encoding?
if @accept_charset_error_block
@@ -578,7 +578,7 @@ class CGI
if tempfiles
tempfiles.each {|t|
if t.path
- t.unlink
+ t.close(true)
end
}
end