aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plum/client/decoders.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plum/client/decoders.rb')
-rw-r--r--lib/plum/client/decoders.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/plum/client/decoders.rb b/lib/plum/client/decoders.rb
index e6d72e7..d68f27b 100644
--- a/lib/plum/client/decoders.rb
+++ b/lib/plum/client/decoders.rb
@@ -17,14 +17,14 @@ module Plum
def decode(chunk)
@inflate.inflate(chunk)
- rescue Zlib::Error => e
- raise DecoderError.new("failed to decode chunk", e)
+ rescue Zlib::Error
+ raise DecoderError.new("failed to decode chunk", $!)
end
def finish
@inflate.finish
- rescue Zlib::Error => e
- raise DecoderError.new("failed to finalize", e)
+ rescue Zlib::Error
+ raise DecoderError.new("failed to finalize", $!)
end
end
@@ -35,14 +35,14 @@ module Plum
def decode(chunk)
@stream.inflate(chunk)
- rescue Zlib::Error => e
- raise DecoderError.new("failed to decode chunk", e)
+ rescue Zlib::Error
+ raise DecoderError.new("failed to decode chunk", $!)
end
def finish
@stream.finish
- rescue Zlib::Error => e
- raise DecoderError.new("failed to finalize", e)
+ rescue Zlib::Error
+ raise DecoderError.new("failed to finalize", $!)
end
end