Fix map decode when transform_keys is not to_s
1 files changed, 2 insertions(+), 3 deletions(-) M lib/dhall/coder.rb
M lib/dhall/coder.rb => lib/dhall/coder.rb +2 -3
@@ 105,12 105,11 @@ module Dhall refine List do def to_ruby(&decode) arr = to_a.map(&decode) unless element_type.is_a?(RecordType) && element_type.keys == ["mapKey", "mapValue"] return arr return to_a.map(&decode) end Hash[arr.map { |h| h.values_at("mapKey", "mapValue") }] Hash[to_a.map { |r| [r["mapKey"].to_s, decode[r["mapValue"]]] }] end end