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:
parent
060c4f3e8b
commit
14479e97dd
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user