From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2025-02-14T05:44:26+00:00 Subject: [ruby-core:121038] [Ruby master Bug#20982] Inconsistency between Hash#inspect and ENV.inspect in Ruby 3.4 Issue #20982 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ruby_3_4 commit:24f48c83e7e851a6ca712fc7b498634da9a24789. ---------------------------------------- Bug #20982: Inconsistency between Hash#inspect and ENV.inspect in Ruby 3.4 https://bugs.ruby-lang.org/issues/20982#change-111946 * Author: herwin (Herwin W) * Status: Closed * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE ---------------------------------------- Ruby 3.4 changed the stringified output of Hash to add whitespace to the hashrockets ``` ruby -e 'p({"a"=>"b"})' {"a" => "b"} ``` The output of `ENV.inspect` is very similar to `Hash#inspect`, but does not include the whitespace ``` ruby -e 'p ENV' {"SHELL"=>"/bin/bash", [...] } ``` Adding the extra whitespace around the hashrockets would improve the readability, and make things more consistent. -- 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/