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=cOo4IHaC; 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=i0MWrmIR; 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 ECFE6D484A for ; Thu, 23 Oct 2025 13:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1761227907; bh=eQRudzqjUBO+bLJLI8wANKm2i52eqc6OBNAAZu+r7f8=; 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=cOo4IHaC6IAt+K7f+XhD8RzJJnjV2d00QLxnycdsR1XUD7V5WOmUM3PKKbhP9QhGs jbgZSX0ArmcxSa3CWH0EnqLgmM5JAHzD3p2dOfD8eNbC/bRI9Zb/cZ+ejBopKZzjMs l/7qp3kd2HVhuHs3PslpjdH1goM8TenHAgfVMNU4= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4F8CE492F7 for ; Thu, 23 Oct 2025 13:58:27 +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=i0MWrmIR; 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 ED5BD4917B for ; Thu, 23 Oct 2025 13:57:21 +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=9jfp1Xwu+X7w8kbE/HQ6/Pm1wjtrjkFMdrZZ8jx/TsY=; b=i0MWrmIRoy02wW0Ry36wXVnrZELanLut/Uc1DE/qlLBApMhBa/orTja5MqI8BDQoJqz1 jfFjijznBrU8V6ZtrzJlMvAD8Pf22fNFeM/sSSiM1gbcCqZKZ+cWCb2qs6xZOzV/+oLDPv BkIGt/4LohG97mmnXl06a0fHeIOSJcHJ4V9T5FDpC768cw488K2Ev/Y5wUNZA7w8AJhdW5 r/WodbP4OVX+FjMxXyVkpvLBTqcwYBw6AazI3Rjp9fY1QjXpMiD5Dmwl0SWefsAinUT6kB +RL1jVLKYCxNBJvPac2qBx2CbqNbAXjkt6gkvlchQMAxMBj6BaxnQtAYaRM2i10g== Received: by recvd-686fbc5d8-wx9kd with SMTP id recvd-686fbc5d8-wx9kd-1-68FA3440-13 2025-10-23 13:57:20.241878549 +0000 UTC m=+12172399.031568523 Received: from herokuapp.com (unknown) by geopod-ismtpd-1 (SG) with ESMTP id xPied9N-QcqekOMyoqxcKw for ; Thu, 23 Oct 2025 13:57:20.173 +0000 (UTC) Date: Thu, 23 Oct 2025 13:57:20 +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: nobu 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: 100359 X-SG-EID: =?us-ascii?Q?u001=2E5PtzXJ23KrYzgM1nrOIr+EQ222PyrDaWSg0Er8CZ8tP86xyXmBM81zBKD?= =?us-ascii?Q?HreavdFYMbHjxXOR6UPMkt=2Fu9CyBIp6y52n8D2y?= =?us-ascii?Q?qA9zqurrgUd2STbJ6DeKdsoyOd+iXgwksnMd1Yo?= =?us-ascii?Q?0niF2ROCfPPZkof9K7qKFN7LVxj8nHQr=2FbIZv5L?= =?us-ascii?Q?LiVfCO+rm9He2qanus8xl7KiAzHPaPPf=2Fg5aMWV?= =?us-ascii?Q?PBNFEtDS9KGZw9ekuorvBoFK7JM+th9yFwNc4Xl?= =?us-ascii?Q?nC2Qw8hKmQNdrlNrfLATz=2FQ5yw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: BTI7ADKJHVWQU6ZXRXMZBHZA4J5INKDN X-Message-ID-Hash: BTI7ADKJHVWQU6ZXRXMZBHZA4J5INKDN 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:123537] [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: "nobu (Nobuyoshi Nakada) via ruby-core" Cc: "nobu (Nobuyoshi Nakada)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #21572 has been updated by nobu (Nobuyoshi Nakada). https://github.com/ruby/ruby/pull/14923 ---------------------------------------- Feature #21572: Make illegal variable in alternation pattern a syntax error https://bugs.ruby-lang.org/issues/21572#change-114913 * 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/