Use Array#intersection.any? for Ruby 3.0.x
What does this MR do and why?
Array#intersect? was introduced in Ruby 3.1, but we still support 3.0 so we can't use it yet.
The change in !143831 (merged) is causing the ruby3_0 scheduled pipelines to fail.
This is similar to !144396 (merged).
Edited by Stan Hu