
25 Dec
2024
25 Dec
'24
3:17 p.m.
Issue #20982 has been reported by herwin (Herwin W). ---------------------------------------- Feature #20982: Inconsistency between Hash#inspect and ENV.inspect in Ruby 3.4 https://bugs.ruby-lang.org/issues/20982 * Author: herwin (Herwin W) * Status: Open ---------------------------------------- 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/