Skip to content

Commit b7cab5e

Browse files
JonRoweluke-hill
authored andcommitted
Remove unknown hash keyword arguments (#1757)
* Pass hash through as explicit hash to avoid unknown keyword argument error. * Changelog entry for #1757
1 parent b6779f3 commit b7cab5e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
99
Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber.
1010

1111
## [Unreleased]
12+
### Fixed
13+
- 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))
1214

1315
## [9.2.0] - 2024-03-19
1416
### Changed

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)