Subject: Re: Different Ways To Loop
From: ruby-talk waltco.biz
Date: Sun, 4 May 2008 11:27:46 +0900
References: 300569300571
In-reply-to: 300571
Quoting Linux Devil <devil.of.linux / gmail.com>:
>
> 100.times {|x| puts x + 1}
> (1..100).to_a.each {|x| puts x}
> --
> Posted via http://www.ruby-forum.com/.
>
>
You don't even need the to_a part
(1..100).each { |x| p x }