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,RCVD_IN_DNSWL_HI, 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 58BF11F601 for ; Thu, 15 Dec 2022 13:48:19 +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="azEtLzjN"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4730F7F0A4; Thu, 15 Dec 2022 13:48:04 +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=azEtLzjN; dkim-atps=neutral Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 2E2C87F09D for ; Thu, 15 Dec 2022 13:47:58 +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=MKrepBVuRjX+FqBFIG3G0FLVDNyz4Z68OVBBJtn11D0=; b=azEtLzjNjrPGmo+SHbJDZKEIxo+s6+aO3GP1sQinwkhe5F70WQnmXgyd/npz8yQaRLZD 8W0Ybhqt/OjvaSe9lEaRW0LqK6BJsWwzm20oSPHOvk1d2FxTxN7QKvzPw2ktA5kRSmafRy RUiMXObtN54x1ynYhTmZcWk2xOuhDltIdfBAxF7qSCr6o4CA1Xa3Mp2NWtELMbnWNm2IWU MH/ErpF9C3zFoHyowYccoAUqCudm9GSO+vjONY9oRAfVAVd+BD7PJDx1pH9wA4uuBBV6s4 TTrF570JYymz4Gp4xC+ZdMfrxcQmXdEKc8OUYqGsDKlAbLT9KSLbp4D+HDxBLfPg== Received: by filterdrecv-69c5db5cf4-w69gb with SMTP id filterdrecv-69c5db5cf4-w69gb-1-639B258C-3C 2022-12-15 13:47:56.708552617 +0000 UTC m=+2385591.166816536 Received: from herokuapp.com (unknown) by geopod-ismtpd-1-5 (SG) with ESMTP id S4t6MsDTRdKPuch_FXovhA for ; Thu, 15 Dec 2022 13:47:56.678 +0000 (UTC) Date: Thu, 15 Dec 2022 13:47:56 +0000 (UTC) From: "Eregon (Benoit Daloze)" 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: Eregon 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: 87711 X-SG-EID: =?us-ascii?Q?DvL3W2Xo+Vk=2FeUn3F50L=2FNc8u9NqZCnbE0mXZHiyye4R1YZg=2FtAFc0SAFzpcS=2F?= =?us-ascii?Q?Zcr7BqPN=2FYCcMZBMITNeIci9STxYay0JAJWPbek?= =?us-ascii?Q?rFR+qU4ktf6uip4=2Fu7ohstgrJ7TE=2FwOLhQJGMD3?= =?us-ascii?Q?2chRCWKYa08fT+eRpBJK4g=2FvsLNv0mA2+8OAX6y?= =?us-ascii?Q?5q211fO6eDtfJmbQU=2F3RYmOBDj1Loadl2eX4QTO?= =?us-ascii?Q?O1U1G2FwEG=2Fs6Amp+U2ljCWB5gCqpUKSYr6Lr7n?= =?us-ascii?Q?vn21UQcIHeBNLT5muc37g=3D=3D?= To: ruby-dev@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: 3UALPDS4D2PGCFE7DTD3XEJKSHBCQI2X X-Message-ID-Hash: 3UALPDS4D2PGCFE7DTD3XEJKSHBCQI2X 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=3A52028=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 Eregon (Benoit Daloze). shugo (Shugo Maeda) wrote in #note-14: > Speaking of implicity of blocks, `def f; g(&); end` causes a syntax error, so it may be better to allow it, or disallow `def f(...); g(&); end` in the future versions. Since some time @ko1 worked on no implicit block if not a parameter of the method (with the exception of `yield` in the body). I think that's a good property, so I think it's good for `def f; g(&); end` to be a syntax error. For `def f(...); g(&); end` "..." is "capture all arguments, positional, keyword and block" so I think it's more natural there to be able to access the block (although I can't think of when that would be useful, maybe `def f(...); g(&); h(...) end` when `h` is known to ignore the block but that feels hacky, better use `(*, **, &)` parameters then). > Anyway, I've fixed the behavior of `...` as described in #note-9. Thanks! ---------------------------------------- Feature #19134: ** is not allowed in def foo(...) https://bugs.ruby-lang.org/issues/19134#change-100680 * Author: shugo (Shugo Maeda) * Status: Closed * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: 3.2 ---------------------------------------- `*` 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/