Use Array#intersection.any? for Ruby 3.0.x
What does this MR do and why?
The change in !147549 (merged) causing the ruby3_0 scheduled pipelines to fail (sample job failure: https://gitlab.com/gitlab-org/gitlab/-/jobs/6733662509).
This is similar to !146426 (merged).
Edited by Stan Hu