Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: "Leo M." Newsgroups: comp.lang.ruby Subject: Re: Separate new lines from an output Date: Tue, 5 Apr 2011 05:38:28 -0500 Organization: Service de news de lacave.net Lines: 33 Message-ID: References: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1301999946 14952 65.111.164.187 (5 Apr 2011 10:39:06 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Tue, 5 Apr 2011 10:39:06 +0000 (UTC) In-Reply-To: X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 380985 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2325 Sorry for being imprecise. The matter is this : I have 87 files named black1, black2 ...... black 87. I want ruby to print each file with the entire path, so, this is what I've written : i = 1..87 array = [] e = i.each {|i| puts ("/R/blackout/black"+i.to_s+"\n")} array.push e puts array.size # => 1 ruby actually prints correctly each line, but as a single array object. I need that each line, each path printed is a single array object, so that in the end I'll have an array of 87 as size with : "/R/blackout/black1" "/R/blackout/black2" .. "/R/blackout/black87" I also tried the .chomp method but is pretty much the same :-\ -- Posted via http://www.ruby-forum.com/.