Issue #21641 has been updated by zenspider (Ryan Davis). Status changed from Open to Closed closed by request of OP ---------------------------------------- Bug #21641: Hash#to_s behaves different in 3.4 https://bugs.ruby-lang.org/issues/21641#change-114864 * Author: matheussilvasantos (Matheus Oliveira) * Status: Closed * 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/