From: MonkeeSage Date: 2007-12-04T11:45:01+09:00 Subject: Re: Everyone's favorite flow control: retry On Dec 3, 8:22 pm, Charles Oliver Nutter wrote: > MonkeeSage wrote: > > As I understand, it's like a label in C. Charles' first example is > > equivalent to something like this... > > > #include > > void foo(int (*pf)(const char *f, ...), char *a) { > > (*pf)("%s\n", a); > > } > > int main() { > > retry: > > foo(&printf, "123"); > > goto retry; > > return 0; > > } > > It's more than that...here's some pseudo C code: > > void foo() { goto retry; } > int main() { > retry: > foo(); > return 0; > > } > > Retry outside a rescue actually allows you to jump back across call > boundaries and start an invocation again. Scary. > > - Charlie Ah. How does it unwind the stack like that? Is that what you meant about implementation specific stuff? Ps. I don't think anyone will miss retry outside of a rescue. I won't at least. :) Regards, Jordan