Handle nils in lists
A hopefully Ruby 1.8 and 1.9 compatible use of enumerators