lib/io_streams/row/writer.rb in iostreams-1.0.0.beta vs lib/io_streams/row/writer.rb in iostreams-1.0.0.beta2
- old
+ new
@@ -12,10 +12,10 @@
#
# Note:
# - The supplied stream _must_ already be a line stream, or a stream that responds to :<<
def self.stream(line_writer, original_file_name: nil, **args)
# Pass-through if already a row writer
- return block.call(line_writer) if line_writer.is_a?(self.class)
+ return yield(line_writer) if line_writer.is_a?(self.class)
yield new(line_writer, **args)
end
# When writing to a file also add the line writer stream