From 87a375822f0f1d76fa464423f9743e36c5036713 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sun, 14 Jul 2024 23:21:43 +0100 Subject: [PATCH 1/2] Pass hash through as explicit hash to avoid unknown keyword argument error. --- lib/cucumber/multiline_argument/data_table.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/multiline_argument/data_table.rb b/lib/cucumber/multiline_argument/data_table.rb index 4914b9478..1261ac585 100644 --- a/lib/cucumber/multiline_argument/data_table.rb +++ b/lib/cucumber/multiline_argument/data_table.rb @@ -75,7 +75,9 @@ def row(row) def eof; end end - NULL_CONVERSIONS = Hash.new(strict: false, proc: ->(cell_value) { cell_value }).freeze + # This is a Hash being initialized with a default value of a Hash, DO NOT REFORMAT TO REMOVE {} + # Future versions [3.4.0+] of ruby will interpret these as keywords and break. + NULL_CONVERSIONS = Hash.new({ strict: false, proc: ->(cell_value) { cell_value } }).freeze # @param data [Core::Test::DataTable] the data for the table # @param conversion_procs [Hash] see map_column From 36afcdf0323f29cec3f2fddc4af0453354097dc9 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 22 Aug 2024 23:17:04 +0100 Subject: [PATCH 2/2] Changelog entry for #1757 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6ca8a2f..e00679625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo ### Fixed - Fixed an issue where a change to one example in compatibility testing wasn't fully adhered to ([luke-hill](https://github.com/luke-hill)) +- 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)) ### Removed - Removed support for Ruby 2.7 ([luke-hill](https://github.com/luke-hill))