ruby / csv

CSV Reading and Writing
https://ruby.github.io/csv/
BSD 2-Clause "Simplified" License
178 stars 113 forks source link

Parsing CSV files from ARGF stopped working correctly starting from Ruby 2.5 #228

Closed Fravadona closed 2 years ago

Fravadona commented 2 years ago

Hi everyone,

I noticed that, starting from Ruby 2.5, parsing multiple CSV files from ARGF stops after reading the first input. For example, the simple one-liner:

ruby -r csv -e 'CSV.new(ARGF).each{|row| p row}' file1.csv file2.csv

Only processes the content of file1.csv

kou commented 2 years ago

Thanks for your report. I've fixed this.

Fravadona commented 2 years ago

Thank you. I applied the modification to my target Ruby 2.7 and it works now.