From: "Peña, Botp" Date: 2008-11-26T12:20:25+09:00 Subject: Re: Begin else pattern question From: Mikel Lindsaar [mailto:raasdnil@gmail.com] # def initialize(value) # begin # if value == 'blah' # a_action # else # b_action # end # rescue # b_action # end # end # # That is. If a is needed and doing a throws an exception, do # b instead. Otherwise, if a is not needed do b. and what if b_action throws, rescue it also w b_action ?? maybe, something like, def initialize(value) if value == 'blah' begin a_action rescue b_action end else b_action end end or, if you like a flag and ensure def initialize(value) a_action if flag = (value == 'blah') rescue flag = false ensure b_action unless flag end