aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http/response.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index 674faf2cfc..253c5cbe98 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -260,11 +260,11 @@ class Net::HTTPResponse
begin
yield inflate_body_io
ensure
- e = $!
+ orig_err = $!
begin
inflate_body_io.finish
- rescue
- raise e
+ rescue => err
+ raise orig_err || err
end
end
when 'none', 'identity' then