From: marcandre-ruby-core@... Date: 2021-04-08T12:32:02+00:00 Subject: [ruby-core:103301] [Ruby master Feature#15198] Array#intersect? Issue #15198 has been updated by marcandre (Marc-Andre Lafortune). Assignee set to matz (Yukihiro Matsumoto) I am positive on the feature as has valid use cases, it can be optimized in C and as a bonus adds no cognitive load. I believe we just need a final "yay" from Matz. I'll add it to the next meeting's agenda. ---------------------------------------- Feature #15198: Array#intersect? https://bugs.ruby-lang.org/issues/15198#change-91386 * Author: c4am95 (Travis Hunter) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- I frequently find myself needing to determine if two arrays intersect but not actually caring about the intersection, so I write code like: ~~~ ruby (a1 & a2).any? ~~~ It would be nice to have an **intersect?** convenience method on **Array** to perform this query. [ruby#1972: Add Array#intersect?](https://github.com/ruby/ruby/pull/1972) -- https://bugs.ruby-lang.org/ Unsubscribe: