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-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no 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 A2A311F4B4 for ; Sat, 26 Sep 2020 07:31:14 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id A9175120B6F; Sat, 26 Sep 2020 16:30:31 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 55AD4120B6E for ; Sat, 26 Sep 2020 16:30:29 +0900 (JST) Received: by filterdrecv-p3iad2-df8579867-45hp9 with SMTP id filterdrecv-p3iad2-df8579867-45hp9-19-5F6EEE30-2D 2020-09-26 07:30:56.727341451 +0000 UTC m=+379947.624910183 Received: from herokuapp.com (unknown) by ismtpd0051p1mdw1.sendgrid.net (SG) with ESMTP id xbaLyM1hQl6ybSqi91zzRQ for ; Sat, 26 Sep 2020 07:30:56.566 +0000 (UTC) Date: Sat, 26 Sep 2020 07:30:56 +0000 (UTC) From: s.wanabe@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 76008 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17193 X-Redmine-Issue-Author: kodnin X-Redmine-Sender: wanabe 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?FsuGSN1PD4adq4aDFRSSBF8ffe=2F4plpeX9T+dOtlSNYhU9JyW7JCV9tjnEe5up?= =?us-ascii?Q?A2O4E6ONEps+Vl+8fZrrbIFovFkQV10TX7BkRGL?= =?us-ascii?Q?VFK+67a3kycUeRtsz5BaQN93KeT5vrKQr0rzjJs?= =?us-ascii?Q?Yx5EUrJMW8NNYZ2lD5Kc=2F=2FjRzgnvE5vNlKXEtUw?= =?us-ascii?Q?RpJIL7tSUefSg0UPAYfpCA5J8GOeL1Dh3Neqgbe?= =?us-ascii?Q?cQKYGTObE5v3xwRb8=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 100167 Subject: [ruby-core:100167] [Ruby master Bug#17193] Endless method definition doesn't work with lambdas 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 #17193 has been updated by wanabe (_ wanabe). I think this is an irb problem, not a ruby problem. ``` $ ruby -ve 'def bar() = lambda { |x| x * x };p bar' ruby 3.0.0dev (2020-09-25T22:52:04Z master 137fa5b27e) [x86_64-linux] # ``` ---------------------------------------- Bug #17193: Endless method definition doesn't work with lambdas https://bugs.ruby-lang.org/issues/17193#change-87737 * Author: kodnin (David Boot) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-darwin19] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Endless method definition doesn't work with lambdas. Please check the attached screenshot. ``` ruby def foo() = 123 # => :foo foo # => 123 def bar() = lambda { |x| x * x } # I expected the method to be defined. def bar() = ->(x) { x * x } # Same issue. ``` Nice to have: ``` ruby def bar = lambda { |x| x * x } def bar = ->(x) { x * x } ``` ---Files-------------------------------- Screenshot 2020-09-26 at 09.19.24.png (714 KB) -- https://bugs.ruby-lang.org/