Wed 16 Nov 2005
Pretty array printing in Ruby
Posted by dkaz under Ruby
Use the pretty print package! (thanks DT)
irb(main):001:0> require ‘pp’
=> true
irb(main):002:0> a = [’abc’, ‘def’, ‘ghi’]
=> [”abc”, “def”, “ghi”]
irb(main):003:0> pp a
[”abc”, “def”, “ghi”]
=> nil

November 16th, 2005 at 4:42 pm
That’s pretty? ROTFL.
February 8th, 2006 at 12:23 pm
Thanks for the tip! (Keep it up. Ignore cranky Java dinosaurs.)