From: "Trys <"@..., "trys\"@"@..., ">"@... Date: 2008-07-21T01:34:48+09:00 Subject: Re: Does "rescue" wihtour argument handle any kind of Exception or not? I単aki Baz Castillo wrote: >> Run p Interrupt.ancestors, and see if you get: >> >> [Interrupt, SignalException, Exception, Object, Kernel] > > ruby1.8 1.8.6.36-1ubuntu3.1 > > irb> p Interrupt.ancestors > [Interrupt, SignalException, Exception, Object, Wirble::Shortcuts, > PP::ObjectMixin, Kernel] > > > It's different! > > >> Also, put p $! into the rescue handler to see _what_ you rescued! > > ----------- > require 'timeout' > > begin > raise Interrupt > rescue > puts "rescued !!!" > puts $! > end > ---------- > > ~# ./test.rb > rescued !!! > wrong number of arguments (0 for 1) Right here is your problem, same thing is happening to me (ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]) For certain reasons raise throws ArgumentError (which then gets caught by single rescue) for Interrupt without additional parameters. This will probably work if you just need to raise Interrupt: raise Interrupt, "an exception"