On May 3, 10:27 pm, ruby-t... / waltco.biz wrote:
> Quoting Linux Devil <devil.of.li... / gmail.com>:
>
>
>
> > 100.times {|x| puts x + 1}
> > (1..100).to_a.each {|x| puts x}
> > --
> > Posted viahttp://www.ruby-forum.com/.
>
> You don't even need the to_a part
>
> (1..100).each { |x| p x }

count = 1; loop { puts count; count += 1; break if count > 100; }