mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- fix failling clone filter spec (Event#clone wasn't a deep enough copy)
This commit is contained in:
parent
2dee0758aa
commit
9b28a20b5c
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue