7stud 7stud wrote:
> In irb, an array displays like this:
> 
> irb(main):001:0> a = %w(bird dog cat)
> => ["bird", "dog", "cat"]
> irb(main):002:0>
> 
> Is there a command to get the same format when I display an array with a
> program?

C:\>type p.rb
a = %w(cat dog bird)
p a

C:\>ruby p.rb
["cat", "dog", "bird"]
-- 
Posted via http://www.ruby-forum.com/.