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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 72CA81F8C6 for ; Thu, 15 Jul 2021 05:42:25 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 9BCD61209DA; Thu, 15 Jul 2021 14:41:09 +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 F22EC12092B for ; Thu, 15 Jul 2021 14:41:07 +0900 (JST) Received: by filterdrecv-574dbbbf6c-8lzr7 with SMTP id filterdrecv-574dbbbf6c-8lzr7-1-60EFCABB-39 2021-07-15 05:42:19.87974079 +0000 UTC m=+20654.409410267 Received: from herokuapp.com (unknown) by geopod-ismtpd-4-2 (SG) with ESMTP id QvElt2RhTky6ZAkglaDx6g for ; Thu, 15 Jul 2021 05:42:19.794 +0000 (UTC) Date: Thu, 15 Jul 2021 05:42:19 +0000 (UTC) From: matz@ruby.or.jp Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 17724 X-Redmine-Issue-Author: jnchito X-Redmine-Issue-Assignee: ktsj X-Redmine-Sender: matz 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-Redmine-MailingListIntegration-Message-Ids: 80735 X-SG-EID: =?us-ascii?Q?bXEIHGfdFwsIlBTndiToCp=2Fmc2rfxRD2sZAksRKJIHXcZhrG5x5spNUlgZY1Va?= =?us-ascii?Q?EiQ3gD5LoJB0lGB4hDyKDPG8rMW50ZmZDJ0Gv3H?= =?us-ascii?Q?k2Jj1Ym=2FZhDVacRqyaRe4YuTTtnQK0=2FOywXxIXz?= =?us-ascii?Q?AbOL7dB9UWQC6Us8XIvDF04ei79g3onq44yWgzs?= =?us-ascii?Q?dwCfFkyPsF4mVe4mFZcfCsxOvlokxsxrtXQ=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 104608 Subject: [ruby-core:104608] [Ruby master Feature#17724] Make the pin operator support instance/class/global variables 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 #17724 has been updated by matz (Yukihiro Matsumoto). Sounds reasonable. Accepted. Matz. ---------------------------------------- Feature #17724: Make the pin operator support instance/class/global variables https://bugs.ruby-lang.org/issues/17724#change-92895 * Author: jnchito (Junichi Ito) * Status: Assigned * Priority: Normal * Assignee: ktsj (Kazuki Tsujimoto) ---------------------------------------- When I use pattern match with instance variables, I get an error message like "expecting local variable or method" ``` ruby @n = 1 case 1 in ^@n # ... end #=> syntax error, unexpected instance variable, expecting local variable or method (SyntaxError) # in ^@n # ^~ ``` However using method is not allowed, either. ``` ruby def n = 1 case 1 in ^n # ... end #=> n: no such local variable (SyntaxError) ``` I think the message "expecting local variable or method" is confusing and should be fixed like "expecting local variable." -- https://bugs.ruby-lang.org/