Notes posted by mltsy

RSS feed
April 2, 2020 - (>= v4.2.1)
0 thanks

Works even on nested structures

@EdvardM added a note years ago saying this does not symbolize the keys of deeply nested hashes, which may have been the case for whatever version of ruby was available at the time, but in 4+, it definitely does work as described:

hash = {"a" => :a, "b" => {z: [[{"c" => 3}, {"c" => 4}], []]}}
=> {:a=>:a, :b=>{:z=>[[{:c=>3}, {:c=>4}], []]}}