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

Bugfix: #278 Cucumber::Ast::Table.diff! is broken when using no headers #832

Closed
wants to merge 4 commits into from

Conversation

roschaefer
Copy link

Summary:

  1. Bugfix: The former (intended) behaviour was to raise an error if more than one header column matches.
    Quickfix: raise ... if candidate_cols.size > 2 ->raise ... if candidate_cols.size > 1
  2. Change: From my point of view, duplicate header values are no problem, just match one after another.

candidate_cols, unmapped_cols = unmapped_cols.partition do |other_col|
other_col[0] == header
end
raise "More than one column has the header #{header}" if candidate_cols.size > 2
Copy link
Author

Choose a reason for hiding this comment

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

Here is the bug: What happened in case of candidate_cols.size == 2 ?

@mattwynne mattwynne closed this in c95539e Apr 20, 2015
@mattwynne
Copy link
Member

Thanks @roschaefer!

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants