Skip to content

CSV::Row#include? aliased twice #69

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

Merged
merged 3 commits into from
Jan 12, 2019
Merged

Conversation

maschwenk
Copy link
Contributor

@maschwenk maschwenk commented Jan 7, 2019

In working on #68 I noticed include? is aliased twice on CSV::Row (with the latter alias taking precedence due to order).

The existing header? method looked simplest so I got rid of has_key? and aliased them all to header?.

Feels like having duplicate aliases defined is destined to create a bug later so figured I'd fix it.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unifying these implementations is OK but we should use has_key?'s implementation because headers always creates a new Array.

@maschwenk
Copy link
Contributor Author

@kou I've addressed your recommendations in 4b8f073. Let me know if you need me to squash/rebase/etc.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
I'll squash and merge.

@kou kou merged commit e72224e into ruby:master Jan 12, 2019
@kou
Copy link
Member

kou commented Jan 12, 2019

Oh... Not squashed...

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

Successfully merging this pull request may close these issues.

2 participants