From: Jeff Wood Date: 2006-06-10T05:44:45+09:00 Subject: ... building my own end-fix statements. I believe it's possible to define my own end-fix qualifiers like "if" and "unless" ... Can anybody provide code examples for defining such a construct in Ruby? For instance : x.doSomething() when x.ready? which would call x.ready? repeatedly until it returned a true then would call x.doSomething() ... I know I could do while( not x.ready? ) sleep 0.5 wend x.doSomething() but I'd rather not. even a when( x.ready? ) { |result| x.doSomething() } would be fine I guess ... but wouldn't work because x.ready? would be precalculated before when gets to it... so it wouldn't ever change... I basically need to be able to pass two blocks if I were to do this ... when( isReadyProc, bodyProc ) ... or something like that. Any ideas ??? --jw.