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=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no 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)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4F31B1F4C4 for ; Thu, 7 Nov 2024 08:58:30 +0000 (UTC) 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=i3kHMWc7; 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=GGnb9cTQ; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1730969907; bh=YiA11V5iF/3ozZBT923Krm2C/CuIWkjS3QG0t5Fqw5o=; 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=i3kHMWc7GHA1YzGUXKuVb73eX2ptkuMu7tvKgEzVzU1vK9not+CgINeSuYiPp8lrM Xf+mjmXAiaTmVOhkTuOvZzGdYTQabdcfWfkGUOicU1aAacDy5N//uUofXy4izgVvvD 9T0thKwOYte85I81jpg86sZCrPyA8r5W6EtYv5gg= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4B4FC44B49 for ; Thu, 7 Nov 2024 08: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=GGnb9cTQ; dkim-atps=neutral Received: from s.wrqvtvvn.outbound-mail.sendgrid.net (s.wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id C91DF4463C for ; Thu, 7 Nov 2024 08:58:16 +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=LT7dIacnvNBMb3u3853TVmI6UrwG8xOe317BKwfTW6Q=; b=GGnb9cTQGWdjmLaJoMyS0/smqxlCg6N+PrBQVsjeeometENxWcnVXuUfSDMw/ARokvXf NfyE6dGpKn+/YljrupDRiVM1w798tYHYtEktkeMEnJgzuWnciZE/RH7CphmU86OPmaTHjb 8rx4qxql5yO6zPiXpx0jPBZA2Xh/Q+1JsX9wzwONM+Qg3XRVtwXAfUz79lZfCg5d7Zznql F89XfV/J0c/8UW7NNDRSbXYxJmGFXzy5DnQcCaO6FfvOF/i7l7yaQd+a0cfAPM4669DdSd JUg6w7hO731+1qvLUDX05x7opYw2WJyl3P9W/eEmWXcPUEMjmzsDMr96A+Jv49tA== Received: by recvd-55fc7fd858-ndsmj with SMTP id recvd-55fc7fd858-ndsmj-1-672C8127-5 2024-11-07 08:58:15.303099368 +0000 UTC m=+4806101.014066126 Received: from herokuapp.com (unknown) by geopod-ismtpd-37 (SG) with ESMTP id HmbTx-gvT12K7oKYHoIugA for ; Thu, 07 Nov 2024 08:58:15.224 +0000 (UTC) Date: Thu, 07 Nov 2024 08:58:15 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20793 X-Redmine-Issue-Author: artemb X-Redmine-Issue-Priority: Normal X-Redmine-Sender: matz 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: 96461 X-SG-EID: =?us-ascii?Q?u001=2Eqca74XLbbBG2T0HhbEZgBN9E1Qhb0c7bGBe1waNAWdTreSqyWPDekZUgq?= =?us-ascii?Q?NYk4+nm=2F0VIqwc8ZBTQxqk7G=2FctsRLtYG2yTl=2FP?= =?us-ascii?Q?2CaGNETxG2SFF58fHdrN7CdEgVr6+pOZK2lTq+B?= =?us-ascii?Q?tDiWEAPme=2FUuhUSZL1MORmqLG3LatU99wiNjzt7?= =?us-ascii?Q?jRGx1y=2FLP3m1kijlWqBeHpJ51LIlNKf2cgbVfgf?= =?us-ascii?Q?POXW+9PzMhL48ppU6=2Fv949X0VCcZlYmY3xPTpX+?= =?us-ascii?Q?384uOYVqAub1w1LopmIfhIHGOg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 6CU53YX5KSELY7UZCPXMRZ6IG6KAZN42 X-Message-ID-Hash: 6CU53YX5KSELY7UZCPXMRZ6IG6KAZN42 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.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:119794] [Ruby master Feature#20793] Allow Multiple Arguments for the .is_a? Method List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "matz (Yukihiro Matsumoto) via ruby-core" Cc: "matz (Yukihiro Matsumoto)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20793 has been updated by matz (Yukihiro Matsumoto). Status changed from Open to Rejected `is_a?(A, B)` can be read as `is_a?(A) || is_a?(B)` or `is_a?(A) && is_a?(B)`. This ambiguity might lead to less readability. Matz. ---------------------------------------- Feature #20793: Allow Multiple Arguments for the .is_a? Method https://bugs.ruby-lang.org/issues/20793#change-110479 * Author: artemb (Artem Borodkin) * Status: Rejected ---------------------------------------- I propose allowing multiple arguments to be passed to the .is_a? Method imply "OR" semantics: ``` ruby name.is_a? String, Symbol ``` Currently, we need to write the following to achieve the same functionality: ``` ruby [String, Symbol].include?(name.class) ``` -- 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/