From: "Thomas B." Date: 2008-08-30T20:35:58+09:00 Subject: Re: Show elements of array separated Kless wrote: > Why when is showed an array into a variable , it is showed with all > characters followed? > > --------------- > foo = ['a', 'b', 'c'] > puts "the content is: #{foo}" # => the content is: abc > --------------- > > I'm supposed that is because at the first it converts the array into a > string. But is there any way of show the elements of array separated? puts foo.inspect It will look exactly like in irb, because irb uses inspect. -- Posted via http://www.ruby-forum.com/.