hashugar
hashugar copied to clipboard
.to_hash does not always return the original hash
Hashes that include arrays of hashes, at least, do not round-trip to Hashugar and back cleanly.
Hashugar.new({foo: {bar: [{baz: 1},{baz: 2},{baz: 3}]}}).to_hash
=> {:foo=>
{:bar=>
[#<Hashugar:0x0000559deb420700
@table={"baz"=>1},
@table_with_original_keys={:baz=>1}>,
#<Hashugar:0x0000559deb420660
@table={"baz"=>2},
@table_with_original_keys={:baz=>2}>,
#<Hashugar:0x0000559deb4205c0
@table={"baz"=>3},
@table_with_original_keys={:baz=>3}>]}}