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 6C4891F4CC for ; Mon, 23 Dec 2024 04:51:36 +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=UPn2s0PT; 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=H1+IZimd; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1734929493; bh=ywErh1xiTps333Vjdj/XYIVW3KmNL/+ZBY01Yt5Cm7k=; 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=UPn2s0PT03jLCEXkMoo9MbE6e+ZwCojv47/dPE+E8Pud8L0k2qF7w+lSo5w878vxY V6eJUN6QDBQyT1xNcH3OokpvFYWJmkc68rf/XOGYPGuij25PNAkUcjlHhGWSDElEtQ YG5XzRFFXeJwU3PhNVy892RWAHycXxDhO5lPU/qI= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4E32D45F41 for ; Mon, 23 Dec 2024 04:51:33 +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=H1+IZimd; dkim-atps=neutral Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 06BB544CD5 for ; Mon, 23 Dec 2024 04:51:29 +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=4ZbZ9NUStDIYQZyj7TDHORkognWgdeecne41v+WPdnM=; b=H1+IZimdU2XRM8NfZPnSQycZx+BV3l/zQk5D2jayJmyadJurA9gvBj2VYAc+Fa3Z9ymE rtEV13bVUcHaaqEOn1jU12CadiaXpQVZEPah3ZrDcVHnH5PvXDanVHBKcbgBhKQOUtrlaN c5fwynGY9Bv+O/3XGGVYxiBenQOLreOJHwsFtptL2U/zxH8w7Z9UCUtq2A1Ytib1iRUBF+ L1NXoOxu46Hba5R5NjheHw+6zi4X3drNJLIFlQDF8rJ6377YQD1oY9mIar9cTw9h68Jqdi RjZiNlGsE1QeL5FaqWLyTnqCBh4lsskx7gsXFlD76GxIK0cPl0DBsXWVB5jXFTrw== Received: by recvd-5f9ffdf494-zx4m2 with SMTP id recvd-5f9ffdf494-zx4m2-1-6768EC50-19 2024-12-23 04:51:28.978633908 +0000 UTC m=+3310450.014619168 Received: from herokuapp.com (unknown) by geopod-ismtpd-21 (SG) with ESMTP id 8pqp-pOrSTC0KF6EpIv_pg for ; Mon, 23 Dec 2024 04:51:28.874 +0000 (UTC) Date: Mon, 23 Dec 2024 04:51:29 +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: k0kubun 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: 97047 X-SG-EID: =?us-ascii?Q?u001=2EsWSpkbcla4bB6tSlkOwdN01=2FLLwMflJlYDs0Ak3Gg6dwg4YUERnU2ZQsI?= =?us-ascii?Q?KPesnHmuO3R4nEnLV41FQje7rMJs=2FlByQKQxPtJ?= =?us-ascii?Q?4AIt7Pq58gDuve8B0XnSVhkvUh6zQkM84S1P2BZ?= =?us-ascii?Q?UTIbZqcHp3pp3V21RPNWBiYkbhDI5BU4Tjukqw2?= =?us-ascii?Q?fXYyXAO9Hfx1xpZ0TqXIuY6rcTFz48OChDMkDPH?= =?us-ascii?Q?=2FbEn6+JqPc9pkmgOIpsFU9+7+0n=2FR=2FXqeZgaXhg?= =?us-ascii?Q?DBoEcQq15aV=2FiTHEyYW=2FfP5LSA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: IYLDF3QZTLMNY2CAU7DYKOU4AS52ZSAF X-Message-ID-Hash: IYLDF3QZTLMNY2CAU7DYKOU4AS52ZSAF 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:120370] [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: "k0kubun (Takashi Kokubun) via ruby-core" Cc: "k0kubun (Takashi Kokubun)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20970 has been updated by k0kubun (Takashi Kokubun). Status changed from Open to Closed So, since it's too close to the release, we reverted https://github.com/ruby/ruby/pull/12398 at https://github.com/ruby/ruby/pull/12418. The reported issue does not happen as of the current master. ---------------------------------------- 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-111147 * Author: tompng (tomoya ishida) * Status: Closed * 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/