Skip to content

Commit 003c16a

Browse files
authored
Merge pull request #324 from rspec/ruby-head-cucumber-fix
Add workaround for cucumber on ruby-head
2 parents 17598ad + 15b8bda commit 003c16a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ci/script/functions.sh

+7
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ function run_cukes {
6565
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
6666
PATH="${PWD}/bin:$PATH" \
6767
bin/cucumber --strict
68+
elif is_ruby_head; then
69+
# 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
70+
sed -i '$i\class Hash; alias :__initialize :initialize; def initialize(*args, **_kw, &block) = __initialize(*args, &block); end' bin/cucumber
71+
72+
RUBYOPT="${RUBYOPT} -I${PWD}/../bundle -rbundler/setup" \
73+
PATH="${PWD}/bin:$PATH" \
74+
bin/cucumber --strict
6875
else
6976
# Prepare RUBYOPT for scenarios that are shelling out to ruby,
7077
# and PATH for those that are using `rspec` or `rake`.

0 commit comments

Comments
 (0)