Skip to content

Fix Ruby 2.7 deprecation warnings for JUnit parser

Max Orefice requested to merge mo-fix-kwargs-deprecation-warning into master

Ref: #257438 (closed)

What does this MR do?

In Ruby 3.0, positional arguments and keyword arguments will be separated. In Ruby 2.7, deprecation warnings related to keyword arguments show up.

Explicitly specify passing keyword arguments instead of a Hash object by using double splat operator.

Since Junit#parse! expects kwargs, updated the spec to pass options as keyword arguments.

Before After
goldenson_Maximes-MacBook-Pro____Code_gitlab-development-kit_gitlab_2020-09-29_11-54-01 goldenson_Maximes-MacBook-Pro____Code_gitlab-development-kit_gitlab_2020-09-29_11-54-17

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Merge request reports