From: dblack@... Date: 2006-02-13T06:38:23+09:00 Subject: Re: Rescuing blocks? --8323328-1477822432-1139780287=:15717 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1477822432-1139780287=:15717" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1477822432-1139780287=:15717 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Mon, 13 Feb 2006, David Vallner wrote: > D=F2a Nede=B5a 12 Febru=E1r 2006 21:43 Daniel Nugent nap=EDsal: >> Is >> >> foo.each {|o| >> raise "Oh noes, it's number 2!" if o =3D=3D 2 >> rescue Exception =3D> e >> puts e.to_s >> } >> >> really that hideous? >> > How would you parse the difference whether the raise applies to the whole > block, or just the previous statement? I think Daniel's idea would be to have it be the same as with method bodies. David --=20 David A. Black (dblack@wobblini.net) Ruby Power and Light (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black --8323328-1477822432-1139780287=:15717-- --8323328-1477822432-1139780287=:15717--