Skip to content

Commit a468bc6

Browse files
authored
Remove unknown hash keyword arguments (#1757)
* Pass hash through as explicit hash to avoid unknown keyword argument error. * Changelog entry for #1757
1 parent 672ce68 commit a468bc6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
1515

1616
### Fixed
1717
- Fixed an issue where a change to one example in compatibility testing wasn't fully adhered to ([luke-hill](https://github.com/luke-hill))
18+
- Fixed an issue for Ruby 3.4.0 where a default hash instantiation was being picked up as keyword arguments ([Jon Rowe](https://github.com/JonRowe))
1819

1920
### Removed
2021
- Removed support for Ruby 2.7 ([luke-hill](https://github.com/luke-hill))

lib/cucumber/multiline_argument/data_table.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def row(row)
7575
def eof; end
7676
end
7777

78-
NULL_CONVERSIONS = Hash.new(strict: false, proc: ->(cell_value) { cell_value }).freeze
78+
# This is a Hash being initialized with a default value of a Hash, DO NOT REFORMAT TO REMOVE {}
79+
# Future versions [3.4.0+] of ruby will interpret these as keywords and break.
80+
NULL_CONVERSIONS = Hash.new({ strict: false, proc: ->(cell_value) { cell_value } }).freeze
7981

8082
# @param data [Core::Test::DataTable] the data for the table
8183
# @param conversion_procs [Hash] see map_column

0 commit comments

Comments
 (0)