Group: comp.lang.ruby
From: Siep Korteling
Date: Sunday, February 17, 2008 3:07 PM
Subject: Re: displaying user inputed arrays

Wally T Terrible wrote:
> I'm not entirely sure what you intend to do. If you wanted to get five
>(...)
> (word_group.length).times {|i| print words_group[i]," "}


length.times ? With "each" you'll get the value at once, not the index.

word_group.each{|word| puts word}

Regards,

Siep

--
Posted via http://www.ruby-forum.com/.

Safety Articles | Usenet Groups | 20lbs in 30 days