From: Robert Dober Date: 2008-07-20T23:55:32+09:00 Subject: Re: Does "rescue" wihtour argument handle any kind of Exception or not? On Sun, Jul 20, 2008 at 4:49 PM, Phlip wrote: > Stefano Crocco wrote: > >>> Exception >>> - StandardError >>> - RuntimeError >>> - ZeroDivisionError >>> - ScriptError >>> - SyntaxError >>> - SystemExit >>> - SignalException >>> - Interrupt > >>> begin >>> raise Interrupt >>> rescue >>> puts "rescued !!!" >>> end > >> For me, using ruby 1.8.7, patchlevel 22 on Gentoo Linux, your code works >> as the article says, that is the exception is not being caught. > > Same with p22 on Ubuntu. (I think I compiled it, too.) > > Run p Interrupt.ancestors, and see if you get: > > [Interrupt, SignalException, Exception, Object, Kernel] > > Also, put p $! into the rescue handler to see _what_ you rescued! > > -- > Phlip > > Did you not mean "the exception was caught" instead of "not being caught" ? Robert