- fix failling clone filter spec (Event#clone wasn't a deep enough copy)

This commit is contained in:
Jordan Sissel 2013-06-02 22:56:19 -07:00
parent 2dee0758aa
commit 9b28a20b5c

View file

@ -70,7 +70,12 @@ module LogStash::EventV1
# Create a deep-ish copy of this event.
public
def clone
return self.class.new(@data.clone)
copy = {}
@data.each do |k,v|
# TODO(sissel): Recurse if this is a hash/array?
copy[k] = v.clone
end
return self.class.new(copy)
end # def clone
public