From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (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 23A0B1F601 for ; Sun, 4 Dec 2022 23:47:07 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.b="Pda5DPJH"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 2551B7E7EE; Sun, 4 Dec 2022 23:46:53 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; 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=Pda5DPJH; dkim-atps=neutral Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by nue.mailmanlists.eu (Postfix) with ESMTPS id B8EB57E7BB for ; Sun, 4 Dec 2022 23:46:46 +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=XUhUUSFoG7zMCx1diDoDQEknIEYbLlNrRtIyL8AFCF8=; b=Pda5DPJHa1R+kMyc+C0aAROePEuoQEY1kSACBjC3jA6ad2cHNtrkgwkyU6Njv6+lE8IK IWliFutLY0oZN9xq9eymjPCaiRcPw+s5cLotQAZh2ebSkgfxX5hC+UAoctv80Lb1/YhnDp QHzKrbgiynNZ0Qj39XiNHEmHRijGlgtD4M00zXj04ySoOUcx3B7VO4Tp6bc3x7smKxfEHg hN1PlqNdA57IWadoM8/QS8lF5JlgerXG3sLe8XWM18v2Hf7jEJ5ssdrv+rIm1Uv581v1Et 5mdrZ7KbkGVCQgJYnLDkLogFI2+ob0J1t4ERtVu81Sdoz0CN8CusxrJFrQcne1Zw== Received: by filterdrecv-8569859b9-t5l9k with SMTP id filterdrecv-8569859b9-t5l9k-1-638D3165-D 2022-12-04 23:46:45.413016482 +0000 UTC m=+1471194.345520492 Received: from herokuapp.com (unknown) by geopod-ismtpd-3-2 (SG) with ESMTP id Dvq8JTc4RCSuJMl_mMBDJQ for ; Sun, 04 Dec 2022 23:46:45.368 +0000 (UTC) Date: Sun, 04 Dec 2022 23:46:45 +0000 (UTC) From: "shugo (Shugo Maeda)" Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 19134 X-Redmine-Issue-Author: shugo X-Redmine-Issue-Assignee: matz X-Redmine-Sender: shugo 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: 87558 X-SG-EID: =?us-ascii?Q?o0C=2FsDUd4ZFGiDZCTbvVjqibxcpCfydz4lwnBQWyXZ+Plw=2FfhrG0CQPbrktOPX?= =?us-ascii?Q?NfKIrb7bilCwkXET66DNxoL2ugtllN4k7lshm0m?= =?us-ascii?Q?ImCywx7IncM7odVif1dUG2GL48yWryC0WC7dCWv?= =?us-ascii?Q?bhp5gOITF5RjrmpF9WIBNLc38nf03rKywaehPX1?= =?us-ascii?Q?G5fX33XXUHllzJqHFGEX+7YO=2FgBTnPFmwAQBtGN?= =?us-ascii?Q?VWSKZT9KIJxNtIQJPClJRfXpVxTn3WYoo+taANj?= =?us-ascii?Q?L+csESGdc79e1oizpwYnw=3D=3D?= To: ruby-dev@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: ACSKX5CVTRU4PPWUN355GFW4L3QPWCAI X-Message-ID-Hash: ACSKX5CVTRU4PPWUN355GFW4L3QPWCAI X-MailFrom: bounces+313651-12dc-ruby-dev=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 (Japanese)" Subject: =?utf-8?q?=5Bruby-dev=3A52012=5D_?= [Ruby master Feature#19134] ** is not allowed in def foo(...) List-Id: "Ruby developers (Japanese)" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Issue #19134 has been updated by shugo (Shugo Maeda). Status changed from Closed to Open I think it's most conservative to probhibit `*` and `**`: ``` def foo(...) bar(&) # OK baz(*) # error quux(**) # error end ``` And a error should occur in the following code instead of dropping keyword arguments: ``` def foo(*, **, &) bar(...) end def bar(*args, **kw, &block) p [args, kw, block&.call] end foo(1, 2, x: 3, y: 4) { 5 } ``` What do you think, Matz? ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100495 * Author: shugo (Shugo Maeda) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- `*` and `&` are allowed in the body of a method with `...` argument forwarding, but `**` is not allowed. ``` def foo(...) bar(*) # OK baz(&) # OK quux(**) # NG end ``` Is it intended behavior? It seems that parse.y has code like `#ifdef RUBY3_KEYWORDS`, and if RUBY3_KEYWORDS, `**` will also be supported. -- https://bugs.ruby-lang.org/