From: Mark Thomas Date: 2009-06-03T21:25:15+09:00 Subject: Re: convert 2D array to cute text table with | pipes ? I wrote an implementation using the Matrix class, but it didn't really make it any shorter/cleaner/DRYer. I think your code is fairly DRY already. The only thing I might suggest is extracting your justification, e.g. def justify(obj,w) case obj when Fixnum obj.to_s.rjust(w) else obj.to_s.ljust(w) end end