From: Mark Volkmann Date: 2006-02-13T04:39:25+09:00 Subject: Re: Rescuing blocks? On 2/12/06, Lou Vanek wrote: > this works, > > foo = [1, 2, 3] > > foo.each do |o| > begin > raise "Oh noes, it's number 2!" if o == 2 > rescue Exception => e > puts e.to_s > end > end Sure it works, but Daniel wants to reduce the syntax a bit AND exit the loop if an exception is raised without having to specify that. I like his suggestion. -- R. Mark Volkmann Partner, Object Computing, Inc.