Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got ArgumentError with unknown keyword in Ruby 3.4.0-preview2 #1769

Open
Tracked by #8587
PikachuEXE opened this issue Nov 27, 2024 · 7 comments
Open
Tracked by #8587

Got ArgumentError with unknown keyword in Ruby 3.4.0-preview2 #1769

PikachuEXE opened this issue Nov 27, 2024 · 7 comments

Comments

@PikachuEXE
Copy link

PikachuEXE commented Nov 27, 2024

πŸ‘“ What did you see?

image

βœ… What did you expect to see?

No error

πŸ“¦ Which tool/library version are you using?

ruby 3.4.0-preview2
cucumber-ruby 9.2.0

πŸ”¬ How could we reproduce it?

I run bundle exec cucumber but the following is easier:

Ruby 3.3:
image

Ruby 3.4:
image

πŸ“š Any additional context?

Trying to fix CI for ruby-head for https://github.com/egonSchiele/contracts.ruby

Update 1: Rubocop added a cop for this: https://docs.rubocop.org/rubocop/cops_lint.html#linthashnewwithkeywordargumentsasdefault

@luke-hill
Copy link
Contributor

luke-hill commented Nov 27, 2024

This is fixed in main - It will be released in cucumber v10. For now if you stick to ruby 3.3 you should be fine

@ashmaroli
Copy link

Hello @luke-hill,
May I ask if you'd be willing to ship a v9.2.1 with just a468bc6 cherry-picked onto a branch spun-off from tag v9.2.0 to resolve this issue for everyone who wish to use cucumber with Ruby 3.4. (One particular use-case is introduction of Ruby 3.4 to existing CI matrix); Especially since v10.0.0 may involve major internal rewrites..?
If you're not willing to ship a patch release in the near future, I could use that reason to justify having my projects point to a temporary fork of cucumber/cucumber-ruby to unblock pull requests waiting on Ruby 3.4 support.
Thanks.

@tagliala
Copy link

tagliala commented Jan 1, 2025

9.2.1 with that commit, if it does not break, would be appreciated

Additionally, it is worth to mention that the comment in a468bc6

# Future versions [3.4.0+] of ruby will interpret these as keywords and break.

feels outdated, since 3.4.0+ is not future anymore and can be improved. Copilot suggests

# Ruby versions from 3.4.0 onwards interpret these as keywords and break.

@jagthedrummer
Copy link

Would be really nice to get a point release with this fix published. Having to wait for cucumber 10 in order to use ruby 3.4 doesn't seem like a great solution, and I'd imagine that lots of people are going to be looking to upgrade to ruby 3.4 in the next few days/weeks/months.

@jagthedrummer
Copy link

I opened #1773 to cherry-pick the ruby 3.4 fix into the 9.2 branch. Unfortunately tests are failing in the 9.2 release branch (an example run), so I'm not sure if this PR actually breaks anything for CI or not. It seems like the main branch in this repo is failing in the same way.

tagliala added a commit to activeadmin/activeadmin that referenced this issue Jan 3, 2025
tagliala added a commit to activeadmin/activeadmin that referenced this issue Jan 3, 2025
@tagliala
Copy link

tagliala commented Jan 4, 2025

FWIW, using cucumber for main allows ActiveAdmin specs to pass without any change: https://github.com/activeadmin/activeadmin/actions/runs/12602417643/job/35125445673

@luke-hill
Copy link
Contributor

If I get to see some more rockets / +1s I will prioritise this.

Because (primarily my fault), we've got a mix of stuff in main it will need a bit of cherry-picking and branching. But I'm happy to prioritise it if I see more demand for it. For now (I think I posted this in another thread), I'm going to continue to work on the v10 rework

jsugarman added a commit to ministryofjustice/laa-apply-for-legal-aid that referenced this issue Jan 7, 2025
Until cucumber 10 is released there is an error:

```shell
<internal:hash>:37:in 'initialize': unknown keywords: :strict, :proc (ArgumentError)
```

This [issue](cucumber/cucumber-ruby#1769) covers the issue and mentions
main is fixed. So can use that to unblock us?!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants