lib/hedgelog/normalizer.rb in hedgelog-0.1.8 vs lib/hedgelog/normalizer.rb in hedgelog-0.1.9
- old
+ new
@@ -1,11 +1,13 @@
class Hedgelog
class Normalizer
+ # rubocop:disable Security/MarshalLoad
def normalize(data)
# Need to Marshal.dump/Marshal.load to deep copy the input so that scrubbing doesn't change global state
d = Marshal.load(Marshal.dump(data))
normalize_hash(d)
end
+ # rubocop:enable Security/MarshalLoad
def normalize_struct(struct)
normalize_hash(Hash[struct.each_pair.to_a])
end