On 12/6/06, Tim Fletcher <twoggle / gmail.com> wrote:
> Logan Capaldo wrote:
> > >
> > If ruby were common lisp, that could actually work. But it's not and our
> > exceptions are not resuamble :).
>
> class Foo
>   def bar
>     yield
>   rescue NameError => method_call
>     p method_call.name
>   end
> end
>
> Foo.new.bar { baz }

Breaks:

irb(main):008:0> a = Foo.new
=> #<Foo:0x2b301a826778>
irb(main):009:0> a.bar { baz }
:baz
=> nil
irb(main):010:0> a.bar { baz; quux }
:baz
=> nil

martin