lib/io_streams/tabular/parser/csv.rb in iostreams-1.5.1 vs lib/io_streams/tabular/parser/csv.rb in iostreams-1.6.0
- old
+ new
@@ -3,11 +3,13 @@
class Tabular
module Parser
class Csv < Base
attr_reader :csv_parser
- def initialize
- @csv_parser = Utility::CSVRow.new unless RUBY_VERSION.to_f >= 2.6
+ unless RUBY_VERSION.to_f >= 2.6
+ def initialize
+ @csv_parser = Utility::CSVRow.new
+ end
end
# Returns [Array<String>] the header row.
# Returns nil if the row is blank.
def parse_header(row)