diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 16:11:12 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 16:11:12 +0000 |
commit | 4fd53e476e493630a140edc085c71f2670d74942 (patch) | |
tree | 07e4bd9801063ad1063e18ca564ed0b159ffc7d2 /lib/cgi/core.rb | |
parent | 42ae24a6e86440d6e05faf81fb278a310aed71ef (diff) |
* ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
it may be set before the body.
Reported by ko1 and mrkn. [ruby-core:59088] [Bug #9247]
* lib/cgi/core.rb: Ditto.
* lib/drb/ssl.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi/core.rb')
-rw-r--r-- | lib/cgi/core.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb index 662e04c9b7..241f817278 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: |