Skip to content

Commit 24bc423

Browse files
JonRowejagthedrummer
authored andcommitted
Remove unknown hash keyword arguments (cucumber#1757)
* Pass hash through as explicit hash to avoid unknown keyword argument error. * Changelog entry for cucumber#1757 Cherry-pick of a468bc6 into the 9.2.0 branch.
1 parent 8b1c8b4 commit 24bc423

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
1010

1111
## [Unreleased]
1212

13+
### Chaneged
14+
- 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))
15+
1316
## [9.2.0] - 2024-03-19
1417
### Changed
1518
- Updated cucumber dependencies (Specifically cucumber-core) ([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)