From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id A51B41F97E for ; Sat, 6 Oct 2018 17:30:48 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 2EC4C120AEB; Sun, 7 Oct 2018 02:30:46 +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 B39FF120A0D for ; Sun, 7 Oct 2018 02:30:44 +0900 (JST) Received: by filter0033p3iad2.sendgrid.net with SMTP id filter0033p3iad2-27919-5BB8F140-14 2018-10-06 17:30:40.498244078 +0000 UTC m=+67605.613798287 Received: from herokuapp.com (ec2-54-158-53-74.compute-1.amazonaws.com [54.158.53.74]) by ismtpd0001p1iad2.sendgrid.net (SG) with ESMTP id 26wmLp0MRLGrSpyseB5GLQ for ; Sat, 06 Oct 2018 17:30:40.439 +0000 (UTC) Date: Sat, 06 Oct 2018 17:30:41 +0000 (UTC) From: shevegen@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 64690 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15198 X-Redmine-Issue-Author: c4am95 X-Redmine-Sender: shevegen 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6zPCubjFKmmoC/7YZu0C+Xx/HZDe23xPNwzo bIjJck6veisF0YNjt8xpMTUnfCKQhQ5n6aq90gjBHQm930fZyAVpxFt1iEv3G7rUNotX9ZOFKOpmqp eYNOc8ER4C39dqTTytZK/UK+YjHEQ98PD/9J62X/j5Oh5ImWPXwvM1WxGg== X-ML-Name: ruby-core X-Mail-Count: 89297 Subject: [ruby-core:89297] [Ruby trunk 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 shevegen (Robert A. Heiler). Demonstrated use cases helps the core team & matz assess on the usefulness of a proposed change, which can help in accepting issue requests ultimately in the long run (if the use case is considered sufficiently useful). :) ---------------------------------------- Feature #15198: Array#intersect? https://bugs.ruby-lang.org/issues/15198#change-74331 * 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/