szyny. mapa, chyba że zero

[1, nil, 3, nil, nil].compact
=> [1, 3] 
Stormy Snail