lib/hedgelog/normalizer.rb in hedgelog-0.1.13.alpha.1 vs lib/hedgelog/normalizer.rb in hedgelog-0.2.0

- old
+ new

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