From: chad fowler Date: 2001-11-18T00:03:00+09:00 Subject: [ruby-talk:25708] Re: Strange behaviour of "rescue" --- Michael Neumann wrote: > Hi, > > This works fine: > > begin > exit > rescue SystemExit > end > > But this not: > > begin exit rescue SystemExit end > > I guess the reason for it is that rescue in the > one-liner form does not > take an exception class (it assumes RuntimeError) so > that the latter > example would be equivalent to: > > begin > exit rescue > SystemExit > end > > Is there a short form for the above? Does the following work as you expect? begin exit; rescue SystemExit; end Chad __________________________________________________ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com