Group: comp.lang.ruby
From: Wally T Terrible
Date: Sunday, February 17, 2008 3:20 PM
Subject: Re: displaying user inputed arrays

Siep Korteling wrote:
> 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
>
>
This is definitely better. I was was looking at the original line that
used an index to print.
(Part of the issue was putting up a solution without really
understanding the problem. =))

Safety Articles | Usenet Groups | 20lbs in 30 days