Fix Rubocop failures in Ruby 3.1

What does this MR do and why?

This commit fixes a number of Rubocop failures flagged in Ruby 3.1: https://gitlab.com/gitlab-org/gitlab/-/jobs/3923877778

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading