From: Joel VanderWerf Date: 2002-02-27T06:19:11+09:00 Subject: Re: RCR?: parallel to until: as_soon_as Patrik Sundberg wrote: > > On Wed, Feb 27, 2002 at 06:01:18AM +0900, Tobias Reif wrote: > > Hi, > > > > would this be worth an RCR? > > > > We have > > until > > ; how about adding > > as_soon_as > > ? > > > > for example > > > > as_soon_as @line_count > max > > raise 'too many lines' > > end > > > > There are ways to achive the same effect, but as_soon_as (or any other > > equivalent name) might express the intent clearer. > > the word you're looking for is the while-loop common to many languages and it > is magically enough already present in ruby too. Unless he's looking for a way to hook @line_count so that the block is executed as soon as an assignment to @line_count makes the condition true.