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 }