lib/io_streams/line/reader.rb in iostreams-1.0.0.beta vs lib/io_streams/line/reader.rb in iostreams-1.0.0.beta2
- old
+ new
@@ -7,12 +7,12 @@
MAX_BLOCKS_MULTIPLIER = 100
LINEFEED_REGEXP = Regexp.compile(/\r\n|\n|\r/).freeze
# Read a line at a time from a stream
- def self.stream(input_stream, original_file_name: nil, **args, &block)
+ def self.stream(input_stream, original_file_name: nil, **args)
# Pass-through if already a line reader
- return block.call(input_stream) if input_stream.is_a?(self.class)
+ return yield(input_stream) if input_stream.is_a?(self.class)
yield new(input_stream, **args)
end
# Create a delimited stream reader from the supplied input stream.