>>>>> "H" == Hal E Fulton <hal9000 / hypermetrics.com> writes: H> repeat_until (i==10) do H> i = foo() H> puts i H> end You have a similar example in ruby-uguide "What is an iterator?" do define repeat and while. Perhaps it can do what you want. Guy Decoux