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, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 5A3E81F45F for ; Sun, 5 May 2019 05:48:36 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 924041209FE; Sun, 5 May 2019 14:48:30 +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 C9A0F120A04 for ; Sun, 5 May 2019 14:48:27 +0900 (JST) Received: by filter0004p3iad2.sendgrid.net with SMTP id filter0004p3iad2-21895-5CCE792A-1F 2019-05-05 05:48:26.956127091 +0000 UTC m=+210149.542775899 Received: from herokuapp.com (unknown [54.80.106.145]) by ismtpd0014p1iad2.sendgrid.net (SG) with ESMTP id EZS09LC7TYaeEpS5qqmz8w for ; Sun, 05 May 2019 05:48:26.925 +0000 (UTC) Date: Sun, 05 May 2019 05:48:27 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68029 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15825 X-Redmine-Issue-Author: jeremyevans0 X-Redmine-Sender: nobu 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?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4BypGbTSstn7it+yryn1zs?= =?us-ascii?Q?jNzDNb6kc50B5lyM1CVUFt61h0kBU4Imf=2FJD58g?= =?us-ascii?Q?Hvwu6occXZNTDGVNV3i33riDA6XwR+pLR0RY0wg?= =?us-ascii?Q?Z4DmFfpPCV0BvLdiyISvv8dMqMim+85bUGSujbj?= =?us-ascii?Q?4ENHarPjbREMMvXnBRSpbJJOlsa4968n2pQ=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92546 Subject: [ruby-core:92546] [Ruby trunk Bug#15825] Fix a case where numbered parameters should not be allowed 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 #15825 has been updated by nobu (Nobuyoshi Nakada). Probably I might think the latter case could be allowed (and forgot to separate these cases), but it doesn't seem worth complicating. ---------------------------------------- Bug #15825: Fix a case where numbered parameters should not be allowed https://bugs.ruby-lang.org/issues/15825#change-77906 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-05-05 trunk 84e71e9fc1) [x86_64-openbsd] * Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONTNEED ---------------------------------------- Because `proc{|| @1}` is a syntax error, the following should also be syntax errors: ```ruby proc { | | @1} proc { |; a| @1 } ``` The attached patch makes both of those cases syntax errors. ---Files-------------------------------- fix-numbered-parameters-opt_bv_decl.patch (1.49 KB) -- https://bugs.ruby-lang.org/