From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E42201F4CC for ; Thu, 19 Dec 2024 17:17:26 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=DEwCRktV; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=gOnwCys7; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1734628644; bh=/JlO8xMyexr5WR7YiSE+Rzp+oG0sKZpSER8QlURRN3M=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=DEwCRktV6NKDhpZXr3ngd6Usv2OmZx06tBLgaAn4dlM+QGFM8SG8prMaHnkJFaeC4 wANHz8//e77kzQ8Ya3mSKWJEPHeYumVj2krU5WOJFAPTzTblOXKL2TbVEDY1hrVQcu SB+dQcjCsEO/DTMZ6DJ2++nJwbRS3c3qFYl1tjEY= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 10F2F452F9 for ; Thu, 19 Dec 2024 17:17:24 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=gOnwCys7; dkim-atps=neutral Received: from s.wfbtzhsw.outbound-mail.sendgrid.net (s.wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 843B844F07 for ; Thu, 19 Dec 2024 17:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=YqOctM5dMAFTKgPZ+VKEmD/ECrq2kVnh8ek+wXomgRw=; b=gOnwCys7qHwXYwMtjw6lWtkM1Gg7ttp6FNh4FBgtsjChPBGZT9yF/fuYcIj1oGZtJtwd X21dyHN8swoNKe52MoG7X/PQUYi3SXq5/HQWLGmNqSUPP6lUT7o00q8kl6jzJtlVl5IQQW NDozLPN4F47CiUQFzAMUX45iAclCn0LaOOeO98VhKlWyDKu4bqh21dvgcVHlb/0Yx0F99b fOqb2Imsh149BkLZrws0leS0LwbK6xFKo/f4lnS5Iv3trhpPEj/Ak613PrP6FVXj84pc8d /OzVst4fP9rh6LBA4BUuO4dYbJO5biMYhdv50/qzEEAFVfL5V8f76L/OPDeW0vXw== Received: by recvd-5f9ffdf494-29sch with SMTP id recvd-5f9ffdf494-29sch-1-67645520-57 2024-12-19 17:17:20.711768672 +0000 UTC m=+3009575.418809497 Received: from herokuapp.com (unknown) by geopod-ismtpd-5 (SG) with ESMTP id RSbT3vJZTFO3ojlyNrFIqg for ; Thu, 19 Dec 2024 17:17:20.699 +0000 (UTC) Date: Thu, 19 Dec 2024 17:17:20 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20970 X-Redmine-Issue-Author: tompng X-Redmine-Issue-Assignee: Group (prism) X-Redmine-Issue-Priority: Normal X-Redmine-Sender: alanwu 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: 97007 X-SG-EID: =?us-ascii?Q?u001=2EYthNhoKkR+ru7duuIBCSWggX1QviTpo1BTmObZjYMiu+oRLYmEDXRfIb7?= =?us-ascii?Q?CNytBX3Z1NzrRLrrRADZUsP0ba42RKmXyzxFR0X?= =?us-ascii?Q?5qmmSTb6uGx5f7wj5gyJyVX07EeIDJ+wqKThkPY?= =?us-ascii?Q?sR0sfDWdGelVEoOfTpKuD9l09IFDmOPEXGoLs0e?= =?us-ascii?Q?SqV0KmKp94vpumO9ZVoD8LrFvhKEtDbD9MigbNq?= =?us-ascii?Q?CvtxhWgO0SaJLiJQTp1n4dAq=2FNI7YriQkNV6joX?= =?us-ascii?Q?ta4p?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: QSRSP34C7CZSKHFPNNI5NXMIS4FJYY4H X-Message-ID-Hash: QSRSP34C7CZSKHFPNNI5NXMIS4FJYY4H X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:120330] [Ruby master Bug#20970] `it /1/i` raises undefined method 'it' for main (NoMethodError) even if binding.local_variables includes `it` List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "alanwu (Alan Wu) via ruby-core" Cc: "alanwu (Alan Wu)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20970 has been updated by alanwu (Alan Wu). Assignee set to prism Prism outputs undesired parse tree with the example. ---------------------------------------- Bug #20970: `it /1/i` raises undefined method 'it' for main (NoMethodError) even if binding.local_variables includes `it` https://bugs.ruby-lang.org/issues/20970#change-111104 * Author: tompng (tomoya ishida) * Status: Open * Assignee: prism * ruby -v: ruby 3.4.0dev (2024-12-19T07:16:12Z master 335bba0fde) +PRISM [x86_64-linux] * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED ---------------------------------------- `it` parameter became a local variable with #20965, but it does not behave like local variable with `--parser=prism` ~~~ruby i=2 42.tap do p it # 42 p local_variables # [:it, :i] p it /1/i # should be 21, got NoMethodError end ~~~ It prints `42`, `[:it, :i], `21` with `--parser=parse.y` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/