Project

General

Profile

Actions

Feature #15198

closed

Array#intersect?

Feature #15198: Array#intersect?

Added by c4am95 (Travis Hunter) about 7 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
[ruby-core:89269]

Description

I frequently find myself needing to determine if two arrays intersect but not actually caring about the intersection, so I write code like:

(a1 & a2).any? 

It would be nice to have an intersect? convenience method on Array to perform this query.

ruby#1972: Add Array#intersect?


Related issues 2 (1 open1 closed)

Actions

Also available in: PDF Atom