lib/json/ld/compact.rb in json-ld-1.1.0 vs lib/json/ld/compact.rb in json-ld-1.1.1
- old
+ new
@@ -154,12 +154,10 @@
end
end
end
# Re-order result keys
- r = Hash.ordered
- result.keys.kw_sort.each {|kk| r[kk] = result[kk]}
- r
+ result.keys.kw_sort.inject({}) {|map, kk| map[kk] = result[kk]; map}
else
# For other types, the compacted value is the element value
debug("compact") {element.class.to_s}
element
end