Suppress / Disable Warnings for Ruby One-line pattern matching

MR: Suppress Ruby experimental features warning mes... (omnibus-gitlab!7137 - merged)

With ruby 3 and 16.1+ when running the migration check rails commands lots of warnings are now being reported.

warning: One-line pattern matching is experimental, and the behavior may change in future versions of Ruby!

This makes checking for all of the migrations a lot more confusing. https://docs.gitlab.com/ee/update/background_migrations.html#background-migrations

warnings

Potential workaround

echo "-W0" > /opt/gitlab/etc/gitlab-rails/env/RUBYOPT

Proposal

With rails runner commands (or maybe generally) disable the experimental warnings.

Warning[:experimental] = false
Edited by Chad Woolley