From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 405341960016 for ; Mon, 29 Jun 2015 01:45:30 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 3E2A2B5D882 for ; Mon, 29 Jun 2015 02:10:28 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 731B097A826 for ; Mon, 29 Jun 2015 02:10:29 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4WkrT_rO73U9 for ; Mon, 29 Jun 2015 02:10:29 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 37C9F97A820 for ; Mon, 29 Jun 2015 02:10:29 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 8B003952441 for ; Mon, 29 Jun 2015 02:10:20 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 3B85F120463; Mon, 29 Jun 2015 02:10:19 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id D43E712043F for ; Mon, 29 Jun 2015 02:10:10 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=0V2jIko8fs3OBaDWHnxK+w/lado=; b=o7fTNxxCh1D64NFgrw 0iYCqJhfl93lPWCd8X7rUT4WUdktpEiX4UuM4T+7hEPTVPkXMMeFI7T+LvMRvTU5 fPuQIDM/HlHFoomVpU3+Kg8TtrWSXjpG19Oa8MBGg2eqw/DIRqoOuTyuDSVUApRg PFBlhSBJNg7TLQWAM25NGTHxI= Received: by filter0826p1mdw1.sendgrid.net with SMTP id filter0826p1mdw1.20493.55902A6B16 2015-06-28 17:10:04.543525207 +0000 UTC Received: from ismtpd-020.iad1.sendgrid.net ([UNAVAILABLE]. [10.42.2.106]) by 10.42.243.102:2500 (trex/5.2.14); Sun, 28 Jun 2015 17:10:05 GMT Received: from herokuapp.com (ec2-54-144-52-158.compute-1.amazonaws.com [54.144.52.158]) by ismtpd-020 (SG) with ESMTP id 14e3b25b64b.672b.6bf1d7 for ; Sun, 28 Jun 2015 17:10:04 +0000 (UTC) Date: Sun, 28 Jun 2015 17:10:03 +0000 From: 0x0dea+redmine@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 44341 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11315 X-Redmine-Issue-Author: 0x0dea X-Redmine-Sender: 0x0dea 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS5q2MWe8PYdJGjpt08DgYVHNdXQwTR7TYU3X5 L5xdPtAfWZRcUIc8IdxfW7YjvBPIsX/PdTG4FI7n1fPbC/InwO19KwdSKf5ngzgEiiFAcH5DD+7brL cPFBn1GVr4QhskH3STJ8sosTGFL/BapCbVZN X-ML-Name: ruby-core X-Mail-Count: 69764 Subject: [ruby-core:69764] [Ruby trunk - Bug #11315] [PATCH] Add Array#^ for parity with other set-like operations. 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11315 has been updated by D.E. Akers. File array_xor_recycle_seen.patch added I forgot to recycle the `seen` hash. This last fix should finalize the patch, unless there is some very clever way to XOR two arrays without requiring two tables or a second pass through one of the arrays. ---------------------------------------- Bug #11315: [PATCH] Add Array#^ for parity with other set-like operations. https://bugs.ruby-lang.org/issues/11315#change-53140 * Author: D.E. Akers * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ## Proposal It is proposed that `Array` be given an "XOR" method which returns the symmetric difference between itself and another array. ## Rationale `#&` and `#|` need a friend to complete the set of set-like operations on `Array`. ---Files-------------------------------- array_xor.patch (2.69 KB) array_xor_vodka.patch (2.97 KB) array_xor_recycle_seen.patch (3 KB) -- https://bugs.ruby-lang.org/