From: "Simon Kröger" Date: 2007-09-08T06:30:04+09:00 Subject: Re: array handling advice Chris McMahon schrieb: > There is probably a simple way to do this, but I'm drawing a blank: Well, no, not exactly simple. first, *rest = *input.enum_slice(3) one, two, three = first.zip(*rest).map{|a| a.compact} is the most elegant way i came up with - if you can live with a result like ["a", "d", "g"] ["b", "e", nil] ["c", "f", nil] than you can strip it down to first, *rest = *input.enum_slice(3) one, two, three = first.zip(*rest) which starts to look nice - if on the other hand you have nil values in your data (and want to keep them) you are pretty screwed with this appoach. cheers Simon