-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix map_headers when headers have the same prefix #1598
Conversation
RtM pending CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
@@ -492,7 +492,7 @@ def convert_headers! # :nodoc: | |||
end | |||
|
|||
@header_mappings.each_pair do |pre, post| | |||
mapped_cells = header_cells.reject { |cell| cell.value.match(pre).nil? } | |||
mapped_cells = header_cells.reject { |cell| pre.is_a?(Regexp) ? cell.value.match(pre).nil? : cell.value != pre } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an opportunity to use #match? ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
Hi @valerianb, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
Great work, thanks for your contribution @valerianb 🙏 |
Thanks all for your reviews and welcoming me here. |
Description
Fixes #1450
Type of change
Checklist:
bundle exec rubocop
reports no offenses