Are you sure that you're calling CSV.open
correctly? The documentation seems to suggest arguments are passed in as hashes:
CSV.open('data.txt', 'r', col_sep: "\t")
The error you're seeing is probably the result of '\t'
being interpreted as a hash and referenced with []
.