mimimi / ruby-tsv

Simple TSV parser
MIT License
37 stars 4 forks source link

Fix split losing last columns #2

Closed GreyCat closed 9 years ago

GreyCat commented 9 years ago

The proposed patch fixes the problem with parsing TSV lines that contain trailing empty columns (for example, something like "1\t2\t3\t\t", which should be expected to become an ["1", "2", "3", "", ""] array). Using additional -1 argument with split invocation solves this problem.

brain-geek commented 9 years ago

@GreyCat thank you for great PR!