From: Brian Candler Date: 2010-06-14T06:15:43+09:00 Subject: Re: Idiomatic Printing an array with commas Chuck Brotman wrote: > I want to print an array (of strings, mostly) with commas separating the > elements (so it would look like the result in the irb You want String#inspect. (irb calls #inspect on the object it's displaying) $ irb --simple-prompt >> a = ["one","two","three"] => ["one", "two", "three"] >> puts a.inspect ["one", "two", "three"] => nil -- Posted via http://www.ruby-forum.com/.