ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "mame (Yusuke Endoh)" <noreply@ruby-lang.org>
Subject: [ruby-core:119653] [Ruby master Bug#20857] Don't change `Hash#inspect` formatting
Date: Thu, 31 Oct 2024 11:49:06 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-110307.20241031114906.703@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20857.20241031103615.703@ruby-lang.org>

Issue #20857 has been updated by mame (Yusuke Endoh).


I ran the asciidoctor test and he have already fixed it. Awesome.

To my knowledge, this change has never required any substantive modification other than updating expectation values of test cases. And in principle, you know, it is not recommended to use `#inspect` results for test expectations. Of course, this does not mean that we can break compatibility just on this principle, though.

> there have failed to build 127 out of 528 packages.

How many of the failures are due to this change?

----------------------------------------
Bug #20857: Don't change `Hash#inspect` formatting
https://bugs.ruby-lang.org/issues/20857#change-110307

* Author: vo.x (Vit Ondruch)
* Status: Assigned
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: ruby 3.4.0dev (2024-10-15 master 3da3cabf98) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Testing Ruby 3.4 in Fedora, I just hit issue like this in AsciiDoctor test suite:

~~~
  1) Failure:
Minitest::Test::TestExtensions::TestIntegration#test_should_assign_captures_correctly_for_inline_macros [test/extensions_test.rb:1382]:
--- expected
+++ actual
@@ -1,9 +1,9 @@
 "target=\"\", attributes={}
-target=\"value,key=val\", attributes={1=>\"value\", \"key\"=>\"val\", \"name\"=>\"value\"}
-target=\"\", attributes={\"text\"=>\"\"}
-target=\"[text]\", attributes={\"text\"=>\"[text]\"}
+target=\"value,key=val\", attributes={1 => \"value\", \"key\" => \"val\", \"name\" => \"value\"}
+target=\"\", attributes={\"text\" => \"\"}
+target=\"[text]\", attributes={\"text\" => \"[text]\"}
 target=\"target\", attributes={}
-target=\"target\", attributes={1=>\"value\", \"key\"=>\"val\", \"name\"=>\"value\"}
-target=\"target\", attributes={\"text\"=>\"\"}
-target=\"target\", attributes={\"text\"=>\"[text]\"}
+target=\"target\", attributes={1 => \"value\", \"key\" => \"val\", \"name\" => \"value\"}
+target=\"target\", attributes={\"text\" => \"\"}
+target=\"target\", attributes={\"text\" => \"[text]\"}
 target=\"target\", attributes={}"
~~~

This suggest that `Hash#inspect` formatting was changed and there are additional spaces around hash rocket. Is the space really worth of the troubles? BTW [here](https://github.com/asciidoctor/asciidoctor/issues/4634#issuecomment-2449497487) is AsciiDoctor upstream reaction and I share the sentiment.



-- 
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/

  parent reply	other threads:[~2024-10-31 11:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 10:36 [ruby-core:119650] [Ruby master Bug#20857] Don't change `Hash#inspect formatting` vo.x (Vit Ondruch) via ruby-core
2024-10-31 10:38 ` [ruby-core:119651] " vo.x (Vit Ondruch) via ruby-core
2024-10-31 11:22 ` [ruby-core:119652] [Ruby master Bug#20857] Don't change `Hash#inspect` formatting hsbt (Hiroshi SHIBATA) via ruby-core
2024-10-31 11:49 ` mame (Yusuke Endoh) via ruby-core [this message]
2024-10-31 12:21 ` [ruby-core:119654] " byroot (Jean Boussier) via ruby-core
2024-10-31 12:48 ` [ruby-core:119655] " vo.x (Vit Ondruch) via ruby-core
2024-10-31 12:58 ` [ruby-core:119656] " byroot (Jean Boussier) via ruby-core
2024-10-31 13:18 ` [ruby-core:119657] " vo.x (Vit Ondruch) via ruby-core
2024-10-31 16:10 ` [ruby-core:119658] " austin (Austin Ziegler) via ruby-core
2024-10-31 16:41 ` [ruby-core:119659] " jeremyevans0 (Jeremy Evans) via ruby-core
2024-11-01  3:13 ` [ruby-core:119667] " mame (Yusuke Endoh) via ruby-core
2024-11-01  3:28 ` [ruby-core:119668] [Ruby master Bug#20857] Ruby 3.4 seems to have backwards compatibility issues more than its predecessors shyouhei (Shyouhei Urabe) via ruby-core
2024-11-01  7:23 ` [ruby-core:119669] " ioquatix (Samuel Williams) via ruby-core
2024-11-01  8:56 ` [ruby-core:119671] " vo.x (Vit Ondruch) via ruby-core
2024-11-01  9:42 ` [ruby-core:119674] " vo.x (Vit Ondruch) via ruby-core
2024-11-01 16:28 ` [ruby-core:119678] " vo.x (Vit Ondruch) via ruby-core
2024-11-07 10:27 ` [ruby-core:119800] " mame (Yusuke Endoh) via ruby-core

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-110307.20241031114906.703@ruby-lang.org \
    --to=ruby-core@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).