From: Rodrigo Rosenfeld Rosas Date: 2011-01-21T23:52:53+09:00 Subject: [ruby-core:34744] Re: Returning from the callee Em 20-01-2011 19:40, Magnus Holm escreveu: > ...This is actually possible using catch/throw, ... > Yes, this means that you'll have to explicitly choose how many > stackframes you want to "escape" from, but that actually makes it less > fragile... > > If logged_in! used a "return callee" approach, this wouldn't have > worked because it would simply returned the admin!-method. If you use > catch/throw explicitly you get more control over what you're > *actually* trying to accomplish. Indeed, I agree. Probably this is not a good use case where a "return callee" approach would be useful. A better one would be to be able to just add the statement "render" without the need to return explicitly after rendering. Rodrigo.