From: "S. Robert James" Date: 2007-02-24T04:55:05+09:00 Subject: enum_cons with tail enum_cons chops off the tail of the collection, if it isn't evenly divisble: e.g.: (1..10).each_cons(3) {|a| p a} # outputs below [1, 2, 3] [2, 3, 4] [3, 4, 5] [4, 5, 6] [5, 6, 7] [6, 7, 8] [7, 8, 9] [8, 9, 10] I'd also like to get: [9, 10, nil] [10, nil, nil] Is there anyway to do this? (The collection is an opened File, too large to load entirely in memory.) I don't have a clear grasp as to how internally Ruby treats a File as Enumerable.