"Hal E. Fulton" <hal9000 / hypermetrics.com> wrote in message
news:000d01c1bf06$d58114c0$5d091b18 / austin.rr.com...
> From: "Sean O'Dell" <sean / celsoft.com>
>
> > Where all can you put rescue clauses?  Are these correct:
>
> > do
> > rescue
> > end
>
> I don't *think* this works...
> hmm, should it?

Yes, I think in the spirit of "least surprise" it should.  I see begin...end
as a block, the same as def...end and do...end (although they all have their
own jobs).  I understand the need for begin...end; sometimes you want to
wrap a block of code by itself in a safety net.  But for those blocks of
code that are already blocked by def or do, it seems logical that you should
be able to throw a rescue in there.

To me, it's "surprising" that you can't use it with any block; that it has
only one block where it works.  After a bit of fighting with rescue, I
learned to not use it with anything but begin...end.

    Sean