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=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham 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 B8AE31F4B4 for ; Fri, 16 Apr 2021 06:56:30 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8C56A120B7F; Fri, 16 Apr 2021 15:55:11 +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 AF479120B7F for ; Fri, 16 Apr 2021 15:55:08 +0900 (JST) Received: by filterdrecv-6b8b466b66-vshtf with SMTP id filterdrecv-6b8b466b66-vshtf-14-60793507-29 2021-04-16 06:56:07.586470185 +0000 UTC m=+37972.901082903 Received: from herokuapp.com (unknown) by ismtpd0192p1mdw1.sendgrid.net (SG) with ESMTP id _lDm_i9hT9yIMqjTFNxyNQ for ; Fri, 16 Apr 2021 06:56:07.275 +0000 (UTC) Date: Fri, 16 Apr 2021 06:56:07 +0000 (UTC) From: matz@ruby.or.jp Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 15198 X-Redmine-Issue-Author: c4am95 X-Redmine-Issue-Assignee: matz X-Redmine-Sender: matz 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-Redmine-MailingListIntegration-Message-Ids: 79521 X-SG-EID: =?us-ascii?Q?bXEIHGfdFwsIlBTndiToCp=2Fmc2rfxRD2sZAksRKJIHWhEj19aUAXEJLs4hOrfb?= =?us-ascii?Q?FYpXloBsx1EJ+RLn4hm3a7Zd=2FzuwT3qOLsQPG=2F0?= =?us-ascii?Q?sXX9hSLuSRA=2FH=2Fv1upj0LhvuAxsJ24I+euEYljv?= =?us-ascii?Q?UeQFfS8K7SUl7fAkPt+UsbgEuGnhmbsSY643og=2F?= =?us-ascii?Q?ab1DMuDPfHzF1DP6EprXkpIr8ezO4LqtrnA=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 103474 Subject: [ruby-core:103474] [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 matz (Yukihiro Matsumoto). Accepted. Matz. ---------------------------------------- Feature #15198: Array#intersect? https://bugs.ruby-lang.org/issues/15198#change-91572 * 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/