From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 5489A1FA7B for ; Mon, 19 Jun 2017 22:46:51 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id D848E120765; Tue, 20 Jun 2017 07:46:48 +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 63F0B120755 for ; Tue, 20 Jun 2017 07:46:46 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=f1OoaegLMCaPWhyuY/vcKau7if8=; b=He/dLuK5aJlkGEtk44 9dpP81k89AJEOeeRgFhS0qWcgfGglAhkj67luzHveGHuZ+SwxoAGFcOxHdwYmubR 8herAzn1Yp2etv3hDIJrrjXqU7ZbPiboW1XgVL1KJxpypix6pKixebOQH3KT69Y9 tl24bCy7IZI+l+ClyH3L7riFI= Received: by filter0816p1mdw1.sendgrid.net with SMTP id filter0816p1mdw1-11062-59485452-3E 2017-06-19 22:46:42.66319743 +0000 UTC Received: from herokuapp.com (ec2-184-72-179-80.compute-1.amazonaws.com [184.72.179.80]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id sDgsypBdTI28UiCpFCuA2g for ; Mon, 19 Jun 2017 22:46:42.646 +0000 (UTC) Date: Mon, 19 Jun 2017 22:46:42 +0000 From: shyouhei@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 56757 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13657 X-Redmine-Issue-Author: JustJosh X-Redmine-Sender: shyouhei 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS6eWDn+5kbfo6mrTqBIaZl0Tv5E2K3G0mLVEB n2SgUTZbKlHEPQJ5i2F1P/ziz4M4xT/zwbcUUw89/63oH8fWa8kqM7FIcqGwyRKU93JDGr3wKSxsVd AQzk1YDx0F+gN555zpb9bz6xq+tLL7tvfE4Q64XS/1gNxvTIvsys+fjFbA== X-ML-Name: ruby-core X-Mail-Count: 81728 Subject: [ruby-core:81728] [Ruby trunk Feature#13657] Simplify usage of Enumerable#reject 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 #13657 has been updated by shyouhei (Shyouhei Urabe). I guess this request is a variant of https://bugs.ruby-lang.org/issues/11286 (if not identical). You would like to join the thread which is still open, i.e there are chances to introduce your request. ---------------------------------------- Feature #13657: Simplify usage of Enumerable#reject https://bugs.ruby-lang.org/issues/13657#change-65428 * Author: JustJosh (Joshua Stowers) * Status: Rejected * Priority: Normal * Assignee: * Target version: ---------------------------------------- The reject method is more complicated than it has to be when removing only a specific value. It would be convenient if we could just plug in the value we wish to delete as an optional argument, for example: ~~~ ruby [1, 2, 3, 4].reject(3) # => [1, 2, 4] ~~~ as apposed to: ~~~ ruby [1, 2, 3, 4].reject { |element| element == 3 } # => [1, 2, 4] ~~~ The next best method I can think of is `#delete`, but that returns the value which is deleted. -- https://bugs.ruby-lang.org/