Place events generated by a filter after the original event

This is a fix for an issue raised by this gist https://gist.github.com/jsvd/b6f38753ba83462892b4

Also, the specs that test the combination of multiple filters had no proper place so "spec/filters/filter_chains.rb" was created.
Sure: cleaner and unshift should be faster.
On Aug 13, 2014 9:05 PM, "Colin Surprenant" <notifications@github.com>
wrote:

> In lib/logstash/config/config_ast.rb:
>
> > @@ -211,7 +211,7 @@ def compile
> >
> >              new_events = []
> >              #{variable_name}.filter(event){|new_event| new_events << new_event}
> > -            event.cancelled? ? new_events : new_events << event
> > +            event.cancelled? ? new_events : new_events.insert(0, event)
>
> event.cancelled? ? new_events : new_events.unshift(event)
>
> ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/elasticsearch/logstash/pull/1627/files#r16201521>.
>