From 172253283f4ace72e395143c8cfeb36e22ef0de0 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sun, 3 Nov 2024 22:58:52 +0000 Subject: [PATCH] Port cucumber fix across from rspec-core --- script/test_all | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/test_all b/script/test_all index 0ba5be3..b33690b 100755 --- a/script/test_all +++ b/script/test_all @@ -25,6 +25,10 @@ if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then # This is JRUBY which requires this one weird path trick... PATH="${PWD}/bin:$PATH" \ bundle exec cucumber --strict +elif ruby -e "exit(RUBY_VERSION.to_f >= 3.4)"; then + # This is a monkey patch to fix an issue with cucumber using outdated hash syntax, remove when cucumber is updated or ruby 3.4 released + sed -i '$i\class Hash; alias :__initialize :initialize; def initialize(*args, **_kw, &block) = __initialize(*args, &block); end' bin/cucumber + bin/cucumber --strict else bundle exec cucumber --strict fi;