lib/io_streams/row/reader.rb in iostreams-1.9.0 vs lib/io_streams/row/reader.rb in iostreams-1.10.0
- old
+ new
@@ -38,9 +38,11 @@
@line_reader = line_reader
@cleanse_header = cleanse_header
end
def each
+ return to_enum(__method__) unless block_given?
+
@line_reader.each do |line|
if @tabular.header?
columns = @tabular.parse_header(line)
@tabular.cleanse_header! if @cleanse_header
yield columns