From: Li Chen Date: 2008-09-24T01:53:30+09:00 Subject: Re: How to get Ruby objects printed out in their 'natural' form Kenneth McDonald wrote: > For debugging purposes, I'd like to be able to do something like > > print [1,2,3] > > and have "[1,2,3]" printed to the screen, not 123. How do I go about > this. I've experimented with to_s and puts, and not found anything > obvious. > > Thanks, > Ken C:\Documents and Settings\chen73>irb irb(main):001:0> a=[1,2,3] => [1, 2, 3] irb(main):002:0> p a [1, 2, 3] => nil irb(main):003:0> Li -- Posted via http://www.ruby-forum.com/.