From: Benedikt Heinen Date: 2006-12-12T23:43:49+09:00 Subject: Re: else inside rescue is useless? On Tue, 12 Dec 2006, Wilson Bilkovich wrote: >> From the Rubinius test suite: > @count = 1 > begin > p @count > raise ArgumentError, 'just kidding' unless @count > 3 > rescue Exception => e > @count += 1 > retry > else > p 7 > ensure > p 8 > end [...] > 'else' only runs if no exception was raised. Yes, else only runs if no exception was raised; and it will run BEFORE the ensure block. BUT unlike code in the main code block (begin..rescue) it CAN raise unchecked exceptions. Benedikt ALLIANCE, n. In international politics, the union of two thieves who have their hands so deeply inserted in each other's pockets that they cannot separately plunder a third. (Ambrose Bierce, The Devil's Dictionary)