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

Typo in CSV documents #91

Open
cuongnguyen0527 opened this issue Apr 11, 2020 · 0 comments
Open

Typo in CSV documents #91

cuongnguyen0527 opened this issue Apr 11, 2020 · 0 comments

Comments

@cuongnguyen0527
Copy link

cuongnguyen0527 commented Apr 11, 2020

I was learning CSV and found this typo in CSV documents for ruby 2.7.1.

# Headers provided by developer
data = CSV.parse('Bob,Engineering,1000', headers: %[name department salary])

data.first.to_h
# { "name department salary" => "Bob", nil => "Engineering" }

It should be %w[name department salary], I think.

This one's too. (%i[numeric date])

CSV.parse('Bob,2018-03-01,100', converters: %[numeric date])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant