On Tue, Sep 29, 2009 at 5:24 PM, Jake Brightmatter
<brightmatter / gmail.com> wrote:
> have this code in Java:
>
> boolean monkey =3D true;
> for(i=3D0; monkey; i++){
> =A0if(index[i] =3D=3D null) {
> =A0 =A0put.something.new(i);
> =A0 =A0break;
> =A0}
> }
>
> I am aware that it makes no sense by itself so I will explain. =A0I am
> iterating through a (Sequel) database nodes. =A0I am looking for a node
> I.D. that is not being used. =A0Basically, I am looking for and open
> parking spot. =A0When I find one, I insert my new data using the newly
> found parking spot. I really can't figure out why I need to uniquely
> identify each node by an I.D. as it is already uniquely identified by
> location in the tree but that is a different matter entirely. =A0All I
> need is how to write a nice infinite 'for' loop in Ruby.

loop {}

> --
> Posted via http://www.ruby-forum.com/.
>
>



--=20
Paul Smith
http://www.nomadicfun.co.uk

paul / pollyandpaul.co.uk