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=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 683CE1F461 for ; Mon, 8 Jul 2019 13:49:29 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id AE5D01208D8; Mon, 8 Jul 2019 22:49:21 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 0F61B1208D8 for ; Mon, 8 Jul 2019 22:49:18 +0900 (JST) Received: by filter0119p3las1.sendgrid.net with SMTP id filter0119p3las1-5996-5D2349E0-7 2019-07-08 13:49:20.26082095 +0000 UTC m=+424642.241498943 Received: from herokuapp.com (unknown [54.91.81.97]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id -mzFR0guRbSHiMnxAFl4nw for ; Mon, 08 Jul 2019 13:49:20.096 +0000 (UTC) Date: Mon, 08 Jul 2019 13:49:20 +0000 (UTC) From: shyouhei@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69110 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15973 X-Redmine-Issue-Author: alanwu 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: =?us-ascii?Q?jcfQDMoo=2FMGCmP3uu1SeyLQUxUPXq5PjHpHz3xSFn17ilhMUUYy43LvLQgE20P?= =?us-ascii?Q?VxuuQweBu5LLMgfQzE=2FKeO9bVBK8yCmccoxf9+B?= =?us-ascii?Q?LxqWZtLURMkbHVm+cSvA4ChPuII=2Fr4Vhkrw7YMI?= =?us-ascii?Q?cXhTLPSzDWEyLtrvkLyN53dToBtKicuu7VTJGZR?= =?us-ascii?Q?auFK0THOh5oUUT3f8Kdc17gza1dAyglWBTw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 93615 Subject: [ruby-core:93615] [Ruby master Feature#15973] Make it so Kernel#lambda always return a lambda 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 #15973 has been updated by shyouhei (Shyouhei Urabe). "It's already broken, why not break it more" is not what I can follow. Can I ask you why you need this feature? If this not more than a matter of consistency, I would like to second @eregon's proposal: lambdas without literal blocks to be prohibited at all. ---------------------------------------- Feature #15973: Make it so Kernel#lambda always return a lambda https://bugs.ruby-lang.org/issues/15973#change-79214 * Author: alanwu (Alan Wu) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- When Kernel#lambda receives a Proc that is not a lambda, it returns it without modification. l propose changing `Kernel#lambda` so it always returns a lambda. Calling a method called lambda and having it effective do nothing was not very intuitive. https://github.com/ruby/ruby/pull/2262 Judging from marcandre's investigation here: https://bugs.ruby-lang.org/issues/15620#note-1 changing the behavior should not cause much breakage, if any. This also happens to fix [Bug #15620] -- https://bugs.ruby-lang.org/