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

Broken on ruby 2.2.2 #3

Open
DanielHeath opened this issue Jul 3, 2015 · 4 comments
Open

Broken on ruby 2.2.2 #3

DanielHeath opened this issue Jul 3, 2015 · 4 comments

Comments

@DanielHeath
Copy link

Parsing a csv now gives you a CSV::Row, which doesn't respond to +.

`'get_diff_fields': undefined method + for #CSV::Row:0x007f91dba5fe50 (NoMethodError).

@agardiner
Copy link
Owner

Can you show me what arguments you are passing to CSVDiff.initialize?

@DanielHeath
Copy link
Author

git clone https://gist.github.com/015432bd43c5ad8d55e9.git should have a repro.

@DanielHeath
Copy link
Author

I've tested on the latest gem release, and master.

@agardiner
Copy link
Owner

OK, I don't think this is anything to do with using Ruby 2.2.2; instead, by passing in the headers: true option to CSVDiff.new, you are instructing CSV to return CSV::Row objects instead of an Array.
If you omit this option, CSVDiff will assume the first row contains headers anyway.
I will also think about a fix to prevent the error with this usage, which is not at all unreasonable.

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

2 participants