From: Raj Sahae Date: 2007-03-20T14:04:37+09:00 Subject: Re: C(++) For Loop Equivalents studlee2 wrote: > What is the most efficient way in Ruby to create a conditional loop in > Ruby that looks like this in C(++): > > for(int i=0; i*j/2 { > //cool method stuff > } > > > I was looking at the .upto() method but it doesn't like the comparison > operator :-/ > > Thanks Why not just do: ((maxNum*2)/(i*j)).times do |n| #cool method stuff end