1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Return only present flows from Flows#to_ary

This commit is contained in:
Holger Just 2017-05-06 23:49:05 +02:00
parent b2c1a1da0e
commit eb6cb29440
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ module Rackstash
alias size length alias size length
def to_ary def to_ary
@flows.to_a @flows.to_a.compact
end end
alias to_a to_ary alias to_a to_ary

View File

@ -90,7 +90,7 @@ describe Rackstash::Flows do
it 'adds nil flows if necessary' do it 'adds nil flows if necessary' do
flow = a_flow flow = a_flow
flows[3] = flow flows[3] = flow
expect(flows.to_a).to eql [nil, nil, nil, flow] expect(flows.length).to eql 4
end end
it 'tries to find a matching flow' do it 'tries to find a matching flow' do