Actions
Bug #21641
closedHash#to_s behaves different in 3.4
Bug #21641:
Hash#to_s behaves different in 3.4
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Description
I couldn't find anywhere documenting this change from Ruby 3.3 to Ruby 3.4:
3.3.9:
> irb
3.3.9 :001 > {x:1}.to_s
=> "{:x=>1}"
3.3.9 :002 >
3.4.0:
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.
Actions