From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on starla X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 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=PwXfCfG/; 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=TistNnlb; dkim-atps=neutral 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)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D197B1F47D for ; Sat, 13 Sep 2025 14:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1757772923; bh=VKpcv3Z2oCh1xFGuLOIkDfYvm5VBhuAKWBs9SpZjTxI=; 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=PwXfCfG/UYdDAspaNzMD4brLLR/r4fb33SFA6ZrcUPeWtI4CpOK9G/DvTTETZU6Ds EcwlP0DS5rH2hzYcRvSE6V6Ji7Q2JsCPpW9T31Jtl4fD85xOUy35vVcdPraYhFT58j 26DwqywWD2ZNANaEJBc6hxCB9VVW3DdTq8U9+7TI= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 85EDD48EA3 for ; Sat, 13 Sep 2025 14:15:23 +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=TistNnlb; dkim-atps=neutral Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 51F5A42D7F for ; Sat, 13 Sep 2025 14:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=date:from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:date:from:subject:to; s=s1; bh=TxbkOAADesL8MVwgsQbNFtRr+tWP3H9kpp/JrdN1mvg=; b=TistNnlbHFXWVNPHtGqtCT2nAJrMsxCLxv0+kxFlJOYOkkjAUIv+Q/+67mrDHXMo02h3 BbFycmAAnNicU/jMCRs5MvFl/hqD6S5doM9dbtY01wRSrKVJ7pZwusIUSrMZaz63+gBTdP ddN6AYgOE5zFG7PAYSGEyVloG3urik6uJbIcXcYh4W3pqKFw9RWyZ+KUjXa1gEQrJ+UEOb jqgbpGpLSJ7285CZmJBCBntCpWpfRIUDRPvae6dh+GPeLPXAy13d69IqXV2+2l1agEeDWD 9h3C3epvIhQ5IYKHxBTh1kljNFekYeGXlVosZjJtWCfpDlx7kqYfe9aMmco9QPlg== Received: by recvd-7fd96f4944-vn5kr with SMTP id recvd-7fd96f4944-vn5kr-1-68C57C40-B 2025-09-13 14:14:24.677272373 +0000 UTC m=+8717409.441943630 Received: from herokuapp.com (unknown) by geopod-ismtpd-23 (SG) with ESMTP id V6pc2sEdQxyyhJmJ_l65nA for ; Sat, 13 Sep 2025 14:14:24.598 +0000 (UTC) Date: Sat, 13 Sep 2025 14:14:24 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 21572 X-Redmine-Issue-Author: kddnewton X-Redmine-Issue-Priority: Normal X-Redmine-Sender: kddnewton 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: 100038 X-SG-EID: =?us-ascii?Q?u001=2E41nWPij=2FD1kdGmpgWeHScbb9X8tZePZrQQx3bl8Vy2odBuMhLMhId2kIq?= =?us-ascii?Q?I4MmMJ43lNHfKPNNds=2Fb3JsTYpYoWyQb3+sPV4d?= =?us-ascii?Q?vscaSKwkBzUoLeaI0RYbfp+5ue=2F+9QuxYW5Bt73?= =?us-ascii?Q?bg+5rw9XYi1xcLSzIUrvcAkOaXhNKMwfhgdemxG?= =?us-ascii?Q?FuCQBhPr0kIx6Zg6LfXKtMicm2S9=2FYDBxrQYDb2?= =?us-ascii?Q?tBUZ4OaHa98+sSdXvMkgxy8JiySTJxGTtHCQv4N?= =?us-ascii?Q?Alla4T8fEwsc4Q5hMRqTOmHFbQ=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 5ABRICOJQ4OUVAS2JEP4QZA7TPPOYKYP X-Message-ID-Hash: 5ABRICOJQ4OUVAS2JEP4QZA7TPPOYKYP X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:123241] [Ruby Feature#21572] Make illegal variable in alternation pattern a syntax error List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "kddnewton (Kevin Newton) via ruby-core" Cc: "kddnewton (Kevin Newton)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #21572 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Feature #21572: Make illegal variable in alternation pattern a syntax error https://bugs.ruby-lang.org/issues/21572 * Author: kddnewton (Kevin Newton) * Status: Open ---------------------------------------- Currently when you have an illegal variable in an alternation pattern, you get a compile error, but no syntax error. ```ruby case foo in {a: } | Array "matched: #{a}" end ``` yields ``` $ ruby -cv test.rb ruby 3.5.0dev (2025-04-10T10:21:51Z master 756479324f) +PRISM [x86_64-linux] Syntax OK ``` but ``` $ ruby test.rb test.rb:2: illegal variable in alternative pattern (a) test.rb: compile error (SyntaxError) ``` Looking at the compiler, since illegal jumps (like break, next, etc.) are now syntax errors, the only other actual compiler errors are related to builtins. I think this should be a proper syntax error, so that editors and other tools can report on it and users can find it in development sooner. -- 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/