From: Yukihiro Matsumoto Date: 2005-12-10T14:34:09+09:00 Subject: Re: next, retry, break? Hi, In message "Re: next, retry, break?" on Sat, 10 Dec 2005 14:01:43 +0900, MenTaLguY writes: |Just to be sure I understand correctly now: | | redo: jumps to the start of the block | | next: jumps to the end of the block | using the given value (or nil) | as the block's result | | retry: unwinds the stack to the call | site of the "closest" yielding | method, calling it again with | the same arguments | | break: unwinds the stack to the call | site of the "closest" yielding | method, using the given value | (or nil) as the method's result | |Is that right? Right, if the term "closest" means what I thought. |If so, what if I want retry or break to unwind further (e.g. because I |am implementing one iterator in terms of another)? I'm not sure what you want. "retry" and "break" jumps out of the method immediately, so that you can do nothing. But you can use "ensure" if you really need iteration termination process. matz.