Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV.filter cannot read more than two files from ARGF with Ruby-3.3.x. #328

Closed
t-nissie opened this issue Feb 23, 2025 · 1 comment
Closed

Comments

@t-nissie
Copy link

CSV.filter can read two csv files from ARGF.
However, CSV.filter cannot read more than two csv files from ARGF with Ruby-3.3.x.

$ for i in 1 2 3 4; do echo "$i,$i,$i">$i.csv; done
$ ls
1.csv 2.csv 3.csv 4.csv
$ ruby --version
ruby 3.3.7 (2025-01-15 revision be31f993d7) [arm64-darwin24]
$ ruby -r csv -e 'CSV.filter{}' 1.csv 2.csv 3.csv 4.csv
1,1,1
2,2,2
$ ruby -e 'ARGF.each{|e| puts e}' 1.csv 2.csv 3.csv 4.csv
1,1,1
2,2,2
3,3,3
4,4,4
$

Thank you!

@kou
Copy link
Member

kou commented Feb 24, 2025

Good catch!

I've fixed this.

@kou kou closed this as completed in a13a4b2 Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants