------art_48397_2065490.1172005121051
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

If it can be compromised to have another variable,
its more like the ruby way ...

lets say myarray,2,3,666,7]

myarray.each_with_index{|a,i| index   and break if a 666 }

index # 3


On 2/20/07, Austin Ziegler <halostatue / gmail.com> wrote:
>
> On 2/20/07, Jim Bob <james_b / anytimenow.com> wrote:
> > Thanks for your help, sometimes best just to program an old fashion for
> > loop ;)
>
> ...except that:
>
>   for a in b
>     return a if a > 5
>   end
>
> ...is the same as:
>
>   b.each { |a| return a if a > 5 }
>
> (Except in matters of scope.)
>
> -austin
> --
> Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
>                * austin / halostatue.ca * http://www.halostatue.ca/feed/
>                * austin / zieglers.ca
>
>


-- 
sur
http://expressica.com

------art_48397_2065490.1172005121051--