Feature #15976

Updated by fcheung (Frederick Cheung) over 1 year ago

This is semantically equivalent to `(ary1 & ary2).any?`, but more efficient and makes the intent more obvious. 

 For example bundler [checks]( ) whether the list of requested groups and the list of groups for a dependency has any overlap - it doesn't care what the overlap is, as long as it is non empty 

 In my personal projects we've found this to be a bottleneck when the arrays are large and where intersections are likely - `!(ary1 `(ary1 & ary2).empty?` ary2).any`? keeps searching for all of the intersection even after we've found the first one, & creates extra garbage because of the intermediate array.