lib/io_streams/gzip/reader.rb in iostreams-1.10.1 vs lib/io_streams/gzip/reader.rb in iostreams-1.10.2
- old
+ new
@@ -1,11 +1,11 @@
module IOStreams
module Gzip
class Reader < IOStreams::Reader
# Read from a gzip stream, decompressing the contents as it is read
- def self.stream(input_stream, original_file_name: nil, &block)
+ def self.stream(input_stream, original_file_name: nil)
io = ::Zlib::GzipReader.new(input_stream)
- block.call(io)
+ yield io
ensure
io&.close
end
end
end