From: Robert Klemme Date: 2005-09-26T21:41:42+09:00 Subject: Re: String#ggsub David A. Black wrote: > Hi -- > > On Mon, 26 Sep 2005, Trans wrote: > >> Sorry, just woke up: >> >> def rep >> r = yield until r.nil? >> end >> > > Or (modeled on some earlier suggestions): > > def rep > true until yield.nil? > end > > or if false is OK: > > def rep > true while yield > end > > I love watching Ruby code progressively disappear from the screen (and > still be clear) :-) Definitely! Now you arrived at my solution - only you use true instead of 1 (three more characters!). :-) Kind regards robert