ruby filter: multi-instance support

Current ruby filter does not support well multiple filter instances in pipeline - only last filter code executes each time. This patch fixes it.