DAB> Anyway, for your hacking pleasure, here is a Matrix-based rewrite. DAB> Note that creating a matrix involves a call to #[] -- for example, DAB> m = Matrix[ [1,2], [3,4] ].) Here's my version, perhaps not as good as the matrix version, but more understandable to me: class StringTable < Array def to_s lens = Array.new # get the maximum length for each column each do |line| line.each_with_index do |word, col| lens[col] = [word.length, lens[col] || 0].max end end # pretty print res = "" each do |line| line.each_with_index do |word, col| res << word.ljust(lens[col]+1) end res << "\n" end return res end end def test1 lst = [ %w{ This is a hack of the }, %w{ program which Bjorn put on the }, %w{ Ruby mailing list earlier this afternoon.} ] puts StringTable[*lst].to_s end test1 ================== One thing weird though... I have to: puts StringTable[*lst].to_s instead of just: puts StringTable[*lst] I don't know why that is. thanks, -joe