Issue #21641 has been updated by masterleep2 (Bill Lipa). It's mentioned in https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/ under Hash#inspect rendering have been changed. [Bug #20433] ---------------------------------------- Bug #21641: Hash#to_s behaves different in 3.4 https://bugs.ruby-lang.org/issues/21641#change-114862 * Author: matheussilvasantos (Matheus Oliveira) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I couldn't find anywhere documenting this change from Ruby 3.3 to Ruby 3.4: 3.3.9: ``` ruby
irb 3.3.9 :001 > {x:1}.to_s => "{:x=>1}" 3.3.9 :002 >
3.4.0:
```ruby
3.4.0 :001 > {x:1}.to_s
=> "{x: 1}"
3.4.0 :002 >
Is there a way to continue with the old behaviour - flag to compilation, monkey patch, etc.? Unfortunately, the application I'm working on stores the `to_s` in Redis and use it later; if the result doesn't match for the same Hash, it would break a few things. -- https://bugs.ruby-lang.org/