From: Lyle Johnson Date: 2009-04-15T23:58:31+09:00 Subject: Re: pretty format arrays On Wed, Apr 15, 2009 at 9:24 AM, Srijayanth Sridhar wrote: > The hack works fine, but on a broader subject, is there a nice easy way of > grouping arrays? You could use Enumerator#each_slice: require 'enumerator' def pretty_print_list(list, num=5) a = [] list.each_slice(5) {|s| a << s.join(",") } a end Hope this helps, Lyle