Prepare Ruby 3 support
What does this MR do?
See #336754 (closed)
We are preparing GitLab to run on Ruby 3. This is a much bigger change than past upgrades, due to several breaking changes in the Ruby stdlib APIs, so we are making an effort to prepare the code base step-wise to not break once we flip the switch.
This MR contains a random assortment of backwards-compatible fixes that were required to make several build jobs in our experimental Ruby 3 branch turn green. Breaking these out will solidify the code base prior to making the switch. What this MR does not do is actually make Ruby 3 the default Ruby. That will happen at a later time.
We already try to catch issues in master that we know will become errors in Ruby 3 (via deprecation_toolkit
), but this does not cover all such issues (since some are hard to detect and are not issuing deprecation warnings in Ruby 2.7) and also does not cover all code (just specs, but not for instance rake tasks.)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.