From: Carlos Date: 2003-05-29T01:35:19+09:00 Subject: Re: exiting of a block > it's a newbie question... > i wanted to do something like: > > result1 = [1, 2, 3].find { |e| > if e == 2 > return true > else > return false > end > } [...] A possibility: result1 = [1,2,3].find { |e| catch (:res) { if e == 2 throw :res, true else throw :res, false end } }