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=-3.0 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 3872F1F601 for ; Wed, 7 Dec 2022 16:02:52 +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="D3i7Hwb9"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id ABF197E576; Wed, 7 Dec 2022 16:02:43 +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=D3i7Hwb9; 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 A42BE7E52B for ; Wed, 7 Dec 2022 16:02:39 +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=ZeSksseQjwKDGfUd1ykLPvObm5+N66lAOi2fYAgu9+8=; b=D3i7Hwb9FgN+ZXBSKGl9cun+AksgHSK4xV3jv+sRJkel2yfgFF4iFlPVqM5BtkzdvSI8 m/QA6sqkX8hFoq/IgXt2P+WEabBzmvw8Sum3Vup5UTz1Krys4WWLELT3a6w+nzwRvO4x64 vgi/ZRQ1M/bw1wuRgbS1rCufO/TzO11t2+PGbn6QfilA/kI9fBVVLiqK/BN72HR9J5rX5U 9lna0YDHoPJxuNtty+qmtuKuPvv1kMVo0YCrnIbnLTB7MAqIoKR+n+BPZMwTDj+qeIwg2H xreKEw+vRZKuY1F6eAUtcp/Mqwh/cXLj57EhMUfsULpMs6Z6HPWpvcef5oreBSKA== Received: by filterdrecv-6f5868ff54-g58kb with SMTP id filterdrecv-6f5868ff54-g58kb-1-6390B91E-B0 2022-12-07 16:02:38.401433174 +0000 UTC m=+1702549.328684555 Received: from herokuapp.com (unknown) by geopod-ismtpd-4-6 (SG) with ESMTP id F7oPfcQVSOOpOlQ10WQTww for ; Wed, 07 Dec 2022 16:02:38.332 +0000 (UTC) Date: Wed, 07 Dec 2022 16:02:38 +0000 (UTC) From: "eightbitraptor (Matthew Valentine-House)" Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 19167 X-Redmine-Issue-Author: tompng X-Redmine-Sender: eightbitraptor 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: 87587 X-SG-EID: =?us-ascii?Q?=2F0CvaroZNcijdGkvKP20=2FpylmEVklNCFnotNv5r375AXMfwPokBnsClISuJPLu?= =?us-ascii?Q?lR6prYpXEpNfyCkjf3oJu9J4MMNRk8oeL54Smq=2F?= =?us-ascii?Q?ESq0TpjizwMjTilmt0ixCD=2Ft1gcMqtWXhsetWQI?= =?us-ascii?Q?v9wLR6J5+ZSyJTc9W21RmDqBMWE2+xrCgS=2F3N4o?= =?us-ascii?Q?DON8MAgQlqVLeovjiWZpKpwHKS6mtep7094vdJJ?= =?us-ascii?Q?C=2FSngrSe6uQPG5sHVBtHNG=2FMgLszdofiA6carNc?= =?us-ascii?Q?3jQy0Sol1xC3ZM1dtkx9HUeFxVJjX7EYR4wlWmW?= =?us-ascii?Q?oHs=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: VJ3VZP4MSCMR6CXLVENMVPKJBRIKG32T X-Message-ID-Hash: VJ3VZP4MSCMR6CXLVENMVPKJBRIKG32T 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.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:111232] [Ruby master Bug#19167] Object#inspect does not correctly show NilClass TrueClass and FalseClass stored in instance variables List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19167 has been updated by eightbitraptor (Matthew Valentine-House). It looks like this behaviour was codified in a spec since the commit that @alanwu mentioned was committed. [This commit (a28aa80c739a1d169649a4da833ef48cfb3465b3)](https://github.com/ruby/ruby/commit/a28aa80c739a1d169649a4da833ef48cfb3465b3) introduces the following specs ``` + it "formats a TrueClass VALUE as `TrueClass` if sign not specified in format" do + s = 'Result: TrueClass.' + @s.rb_sprintf3(true.class).should == s + end + + it "formats a TrueClass VALUE as 'true' if sign specified in format" do + s = 'Result: true.' + @s.rb_sprintf4(true.class).should == s + end end ``` This would indicate that the behaviour of "+PRIsVALUE" in `rb_sprintf` is working as intended, and that we shouldn't remove the special casing from `ruby__sfvextra`. ---------------------------------------- Bug #19167: Object#inspect does not correctly show NilClass TrueClass and FalseClass stored in instance variables https://bugs.ruby-lang.org/issues/19167#change-100521 * Author: tompng (tomoya ishida) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin20] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- ~~~ruby Object.new.instance_eval do @a = nil @b = NilClass @c = true @d = TrueClass @e = [nil, NilClass, true, TrueClass] puts self.inspect end # actual # => # # expected # => # ~~~ ---Files-------------------------------- 0001-Fix-Object-inspect-with-NilClass-as-an-ivar.patch (751 Bytes) -- 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/postorius/lists/ruby-core.ml.ruby-lang.org/