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.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 662e04c9b72..241f817278f 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -574,14 +574,15 @@ class CGI
raise EOFError, "bad boundary end of body part" unless boundary_end =~ /--/
params.default = []
params
- ensure
- if $! && tempfiles
+ rescue Exception
+ if tempfiles
tempfiles.each {|t|
if t.path
t.unlink
end
}
end
+ raise
end # read_multipart
private :read_multipart
def create_body(is_large) #:nodoc: