aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cgi/core.rb5
-rw-r--r--lib/drb/ssl.rb5
2 files changed, 6 insertions, 4 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:
diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb
index 82a9c7ce90..78c0038abc 100644
--- a/lib/drb/ssl.rb
+++ b/lib/drb/ssl.rb
@@ -328,8 +328,9 @@ module DRb
end
begin
ssl = @config.accept(soc)
- ensure
- soc.close if $!
+ rescue Exception
+ soc.close
+ raise
end
self.class.new(uri, ssl, @config, true)
rescue OpenSSL::SSL::SSLError