On Thu, Feb 24, 2011 at 4:59 PM, botp <[email protected]> wrote:
> On Thu, Feb 24, 2011 at 3:55 PM, hard wyrd <[email protected]> wrote:
> > (0..100).each do |x| puts "hello world" end
>
>
if you just want to repeat a process, there's fixnum#times
so, in this case, the ff would do
>
> 100.times{puts "hello, world"}
>
> it's easy to read too.. orally..
>
> best regards -botp
>
I agree. And here is the timing.
100.times{puts 'hello world'}
real 0m0.014s
user 0m0.020s
sys 0m0.000s
love it :)
--
-------------------------------------------------------------
"Penguin, penguin, and more penguin !"
http://www.webhostadmins.com
http://www.madforubuntu.com
http://baudizm.blogsome.com
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://lists.linux.org.ph/mailman/listinfo/klug)
Searchable Archives: http://archives.free.net.ph