From: "Eric I." Date: 2008-11-26T12:05:24+09:00 Subject: Re: Begin else pattern question On Nov 25, 8:02 pm, Mikel Lindsaar wrote: > Why aren't the begin and end blocks needed?  Is it because it is already > encapsulated within a method any way and if it hits rescue, the rescue block > is terminated by the method end in any case? > > What I am trying to ask is "where did you learn when the begin and end are > needed and when not?" :) Hi Mikel, It's in the reference section of the "pickaxe" book (in my edition it's p. 346). Basically there are three cases when you can use a rescue: 1. Directly within a begin/end block. 2. At the top-level of a method. 3. Attached to a single statement. Hope that helps, Eric ==== Interested in hands-on, on-site Ruby or Ruby on Rails training? See http://LearnRuby.com for information about a well-reviewed courses.