From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 73CD51F4C0 for ; Wed, 23 Oct 2019 17:58:54 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E546E120AE2; Thu, 24 Oct 2019 02:58:44 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 362CF120AD8 for ; Thu, 24 Oct 2019 02:58:42 +0900 (JST) Received: by filter0119p3las1.sendgrid.net with SMTP id filter0119p3las1-12092-5DB094D5-13 2019-10-23 17:58:45.23673533 +0000 UTC m=+157477.330239381 Received: from herokuapp.com (unknown [52.91.158.104]) by ismtpd0099p1iad2.sendgrid.net (SG) with ESMTP id x168GpEiRKKk9R1wnSw3eA for ; Wed, 23 Oct 2019 17:58:45.153 +0000 (UTC) Date: Wed, 23 Oct 2019 17:58:45 +0000 (UTC) From: c4am95@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 71100 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15198 X-Redmine-Issue-Author: c4am95 X-Redmine-Sender: c4am95 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?35GSwwLDgM3zUsCWc4SEfszvMGDjTE1El7LDsDafyah6RCXWqg8ScyprfM5vXf?= =?us-ascii?Q?SNyT4=2FvlDsP+jTLbsFdFmdQ8nHPqhrprflx5joN?= =?us-ascii?Q?26KxParuwEnS2pvO=2FN5y+o3zDfp4gB+8l18kUj3?= =?us-ascii?Q?hj3KLG5B6l9Tw8c6O5Sr9K0UreACKrWuU7lHaC6?= =?us-ascii?Q?pDHDs11sIaAl6Ahd3m9=2FxwE49KXXwSy5Qyw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95508 Subject: [ruby-core:95508] [Ruby master Feature#15198] Array#intersect? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #15198 has been updated by c4am95 (Travis Hunter). I tried setting that up here: https://github.com/ruby/ruby/pull/2598 I ignored infinite ranges for now ---------------------------------------- Feature #15198: Array#intersect? https://bugs.ruby-lang.org/issues/15198#change-82284 * Author: c4am95 (Travis Hunter) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- 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/