Skip to content

Fix Maven spec not passing in Ruby 3.2

Stan Hu requested to merge sh-fix-maven-spec-ruby-3.2 into master

What does this MR do and why?

This test previously failed in the Ruby 3.2 scheduled pipeline: https://gitlab.com/gitlab-org/gitlab/-/jobs/5862729717

As https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ explains:

Methods taking a rest parameter (like *args) and wishing to delegate keyword arguments through foo(*args) must now be marked with ruby2_keywords (if not already the case). In other words, all methods wishing to delegate keyword arguments through *args must now be marked with ruby2_keywords, with no exception.

We can fix the test by using Ruby 3-style delegation, since we don't need Ruby 2 compatibility just for this test.

How to set up and validate locally

bundle exec rspec ee/spec/features/dependency_proxy/packages/maven_spec.rb:154
Edited by Stan Hu

Merge request reports