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, T_SCC_BODY_TEXT_LINE 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 39EF11F44D for ; Sun, 17 Mar 2024 18:14:03 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=cSci6LbM; 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=sJZ1Q/mO; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 80FEC834A4; Sun, 17 Mar 2024 18:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1710699233; bh=rqmBBX4P0UzCPEPPb02mlhIILKraf5UdVWLPFqhEH+I=; 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=cSci6LbMYG1TGNBIubTpIrPdU8T5zJFL6KluSHlVI1qd+sWpK+yueNbwMJqQP2fUy W23IqyGnQ8Np6ySNuLnHdv+b8UNtx1k6ODbE9ciKFuQTyX5X6GanTgB05qNfgTLWGQ lFgdcTcy8kmdgMxSO0HWp0SmCX1GR2wXVG6mCOJM= 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 660B28317A for ; Sun, 17 Mar 2024 18:13:48 +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=sJZ1Q/mO; dkim-atps=neutral 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=Gm9lh8ETyDGIW8YE0bpa6cr74KmOyc1DF3U95EasmDI=; b=sJZ1Q/mOsfBROkFOQQPGihsquRSN420A2X1KH+kGI6HROIbTNR3wholi+6mKSuzQcSdy 5uSXrxYx4iKaqUdx6TgfxHJ6+iVMEA11VYsBaTP6468IV9A6D2hiRWii0HqNMvBad2KiXU WyiQ0gSfMcxqgclMROW4TKvhdWNkVtow19JGr7sO73tQZXCKzePhX55RJZN8BwtqgKG4rt UdvuVaAdPXgyX4WaknhmZpNwMH+mFgK0zuXAPCd7AqHyWUSUkL8CBP2A/SJlzeWhvwlfV1 d0ubyWsx4r3+lhhkHqKBKCapBPY855nphb2XCGXn4RP0Ci2cgyL3963xRGGUmzmQ== Received: by filterdrecv-6b965fd7fb-ctlpz with SMTP id filterdrecv-6b965fd7fb-ctlpz-1-65F732DB-5 2024-03-17 18:13:47.376120081 +0000 UTC m=+1106341.165075045 Received: from herokuapp.com (unknown) by geopod-ismtpd-6 (SG) with ESMTP id rPEtN0CUSZiRfX-s2EvEDw for ; Sun, 17 Mar 2024 18:13:47.333 +0000 (UTC) Date: Sun, 17 Mar 2024 18:13:47 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20343 X-Redmine-Issue-Author: koic X-Redmine-Issue-Priority: Normal X-Redmine-Sender: koic 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: 93768 X-SG-EID: =?us-ascii?Q?u001=2EpOR99jQN1eojChpgtpUyjIxewEYD7=2FZx7LLvEjQQnJ8cwbBZnXJIEN6Qc?= =?us-ascii?Q?Bu1GTUUa4X7dr1C+34Vt4YdaVahPWqPjaIuaWr1?= =?us-ascii?Q?+067pqHzf0s0mIBmEzYtOIMzT8fAg=2F9LVyXx2CQ?= =?us-ascii?Q?QZSvyRSGtAuR85b4E5mPsxhtu8at2gI+RnTBQaj?= =?us-ascii?Q?DjrgaNYFlt+ej8+mrRLK2IK1fCgoM2+yLrEVtCA?= =?us-ascii?Q?oTkfSwDteuAekE3yZ9htNWZBCza1k0xFSBuMLKd?= =?us-ascii?Q?RqhMW2UIL8yIWittLbx5K0K+Uw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: F63V2O6KCFBJ77YZEMS6T4ALFH6EMA5Z X-Message-ID-Hash: F63V2O6KCFBJ77YZEMS6T4ALFH6EMA5Z 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.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117202] [Ruby master Bug#20343] Ripper.sexp in Ruby 3.4 returns nil List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "koic (Koichi ITO) via ruby-core" Cc: "koic (Koichi ITO)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20343 has been reported by koic (Koichi ITO). ---------------------------------------- Bug #20343: Ripper.sexp in Ruby 3.4 returns nil https://bugs.ruby-lang.org/issues/20343 * Author: koic (Koichi ITO) * Status: Open * ruby -v: ruby 3.4.0dev (2024-03-17T10:09:37Z master 5fd6b461c7) [x86_64-darwin23] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- In Ruby 3.4.0's Ripper, there is the following incompatible behavior: ## Expected (Ruby 3.3) It is expected that tokens will be returned. ```console $ ruby -rripper -ve "p Ripper.sexp('foo[bar, &baz] += 1')" ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] [:program, [[:opassign, [:aref_field, [:vcall, [:@ident, "foo", [1, 0]]], [:args_add_block, [[:vcall, [:@ident, "bar", [1, 4]]]], [:vcall, [:@ident, "baz", [1, 10]]]]], [:@op, "+=", [1, 15]], [:@int, "1", [1, 18]]]]] $ ruby -rripper -ve "p Ripper.sexp_raw('foo[bar, &baz] += 1')" ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] [:program, [:stmts_add, [:stmts_new], [:opassign, [:aref_field, [:vcall, [:@ident, "foo", [1, 0]]], [:args_add_block, [:args_add, [:args_new], [:vcall, [:@ident, "bar", [1, 4]]]], [:vcall, [:@ident, "baz", [1, 10]]]]], [:@op, "+=", [1, 15]], [:@int, "1", [1, 18]]]]] ``` ## Actual (Ruby 3.4) `nil` is returned. ```console $ ruby -rripper -ve "p Ripper.sexp('foo[bar, &baz] += 1')" ruby 3.4.0dev (2024-03-17T10:09:37Z master 5fd6b461c7) [x86_64-darwin23] nil $ ruby -rripper -ve "p Ripper.sexp_raw('foo[bar, &baz] += 1')" ruby 3.4.0dev (2024-03-17T10:09:37Z master 5fd6b461c7) [x86_64-darwin23] nil ``` The same applies to the following cases. ```ruby foo[bar, &baz] += 1 foo[bar, &baz] ||= 1 foo[bar, &baz] &&= 1 foo.foo[bar, &baz] += 1 foo.foo[bar, &baz] ||= 1 foo.foo[bar, &baz] &&= 1 ``` This was discovered in a failure of Prism's CI: https://github.com/ruby/prism/actions/runs/8317131929/job/22757514162?pr=2607 -- 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/postorius/lists/ruby-core.ml.ruby-lang.org/