lib/hedgelog/normalizer.rb in hedgelog-0.2.1.alpha1 vs lib/hedgelog/normalizer.rb in hedgelog-0.2.1.alpha.2

- old
+ new

@@ -5,16 +5,16 @@ d = Marshal.load(Marshal.dump(data)) normalize_hash(d) end def normalize_struct(struct) - normalize_hash(Hash[struct.each_pair.to_a]) + normalize_hash(struct.each_pair.to_a.to_h) end def normalize_hash(hash) - Hash[hash.map do |key, val| - [key, normalize_thing(val)] - end] + hash.transform_values do |val| + normalize_thing(val) + end end def normalize_array(array) array.to_json end