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 601491F4CC for ; Thu, 19 Dec 2024 08:59:50 +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=lIQkNK1l; 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=QsWa0bE/; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1734598787; bh=+cW9RtO8NM345Vyi0IDqRwCtnOJrIY/azvgq8LMMqQU=; 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=lIQkNK1l7AqBLcA2odd3o1WAe//yl1OH/kmHXUs9iBvjl2qBBEKsJYVZ/cqTYdEyo 23SJReODtzfOUzX+M/fj2O4K5pSiRHoee/IbK3poFfBIt2OUYviFXyMFMc/qHOFVdu /X3htEMwfhfaUFegiru5MklrBFDhDQtWgnzfys10= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id E28C345F5E for ; Thu, 19 Dec 2024 08:59:47 +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=QsWa0bE/; dkim-atps=neutral Received: from s.wfbtzhsv.outbound-mail.sendgrid.net (s.wfbtzhsv.outbound-mail.sendgrid.net [159.183.224.104]) by nue.mailmanlists.eu (Postfix) with ESMTPS id EFBA445300 for ; Thu, 19 Dec 2024 08:59:43 +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=jP6N6CAPyObV8VxTNSj9ZM1KW219k0b+bwHZG/tpqwI=; b=QsWa0bE/xwMIPIldax2RoFOApbjGwA47qjNqY+6K/ccS+6Nq6OBl2kq10aoDoZKl4R3R b73G9TAMgZoSNDgIzugoR50OiS8RAPPgWsq9hBFVWir5LEMXIwT711b4Zdw1rkTM/e5ZkG VNlvteuhY1iVDlscGZkjxky0KQLgV2yEKesGt4VyQDWBqzvgLXmcO/Wp00Ybuwb181dcT5 0lZMA9XdqNwl0OAIR774zjo6qqD7MHWZioNMW0KMj/+pNnJUKZct86D8CzpnQtbmb9szbb lR0sbLSsQ6UOheLYgODRMhMq2/YTdIpjNYkJ5pPNLszZX1KNI9CCyZyTraJJtpHA== Received: by recvd-786d47b7ff-h42c6 with SMTP id recvd-786d47b7ff-h42c6-1-6763E07F-1 2024-12-19 08:59:43.012871244 +0000 UTC m=+2979518.206181984 Received: from herokuapp.com (unknown) by geopod-ismtpd-32 (SG) with ESMTP id xTWS0_3gSgStFwCWTJqErA for ; Thu, 19 Dec 2024 08:59:42.959 +0000 (UTC) Date: Thu, 19 Dec 2024 08:59:43 +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-Priority: Normal X-Redmine-Sender: tompng 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: 97002 X-SG-EID: =?us-ascii?Q?u001=2E6lsr3vWETlnb7CBjJOIVTeDyJi+6PdirmC=2FsKYr6MUleSZrjBxRsGPCJC?= =?us-ascii?Q?i9WOL5Su0kL3wxEGMWtXRNWLbnUY3F6jcf9Xi5o?= =?us-ascii?Q?rvioAGXtTohcUAY7lxp3PAZsyjXkYldyZKi3w1l?= =?us-ascii?Q?geswJn89CUmBi7BiafvZVbosyVWkjrggc70Oeaa?= =?us-ascii?Q?tKprK4w7d0=2FC4mtEA0k1pg7F5C2gmHW0R0nN8XB?= =?us-ascii?Q?01LGF3si3diUYzB9dokT15LKoqSOX=2FVbd4toG+F?= =?us-ascii?Q?ZEgiqilEd9QLv68mbZ1ZPKd2qg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: Z4W3CZDZHF2RDB4EOES2QNUCPT4OPOU7 X-Message-ID-Hash: Z4W3CZDZHF2RDB4EOES2QNUCPT4OPOU7 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:120325] [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: "tompng (tomoya ishida) via ruby-core" Cc: "tompng (tomoya ishida)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20970 has been reported by tompng (tomoya ishida). ---------------------------------------- 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 * Author: tompng (tomoya ishida) * Status: Open * ruby -v: ruby 3.4.0dev (2024-12-19T07:16:12Z master 335bba0fde) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- `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/