lib/io_streams/tabular/parser/psv.rb in iostreams-0.20.3 vs lib/io_streams/tabular/parser/psv.rb in iostreams-1.0.0.beta

- old
+ new

@@ -17,10 +17,12 @@ # Returns [Array] the parsed PSV line def parse(row) return row if row.is_a?(::Array) - raise(IOStreams::Errors::TypeMismatch, "Format is :psv. Invalid input: #{row.class.name}") unless row.is_a?(String) + unless row.is_a?(String) + raise(IOStreams::Errors::TypeMismatch, "Format is :psv. Invalid input: #{row.class.name}") + end row.split('|') end # Return the supplied array as a single line JSON string.