1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-02-05 16:43:21 +00:00

Avoid creating additional array instance on Flows#to_ary

This commit is contained in:
Holger Just 2017-09-21 22:26:27 +02:00
parent 060c4f3e8b
commit 14479e97dd

View File

@ -134,7 +134,7 @@ module Rackstash
# @return [Array<Flow>] an array of all flow elements without any `nil`
# values
def to_ary
@flows.to_a.compact
@flows.to_a.tap(&:compact!)
end
alias to_a to_ary