> > ... and a class is_a module. Obviously, a class which is a subclass of
> > Exception is useful here. But is it ever useful to match against a class
> > which is not a subclass of Exception?
> 
> No, what is allowed there is a subclass of Exception, or an
> instance of Module but not Class.
> 
> For instance, ext/iconv defines some exceptions,
> InvalidEncoding, IllegalSequence and InvalidCharacter those are
> subclasses of ArgumentError, and OutOfRange and BrokenLibrary
> those are subclasses of RuntimeError.  But you can catch them
> at once by rescuing Iconv::Failure.

OK, interesting (and I'd never come across that feature). iconv is written
in C, but as far as I can tell, the semantics are:
   rescue <module>
will rescue any exception which mixes in <module>. Is that right?

Ruby 1.8.4 doesn't seem to enforce the rule that "what is allowed there is a
subclass of Exception, or an instance of Module but not Class":

begin
  raise "hell"
rescue Array         # this is ignored
  puts "unreachable"
rescue Exception
  puts "got it"      # this is executed
end

Having said that, even if it did, it wouldn't have helped me - Timeout is a
module, not a class :-(

Regards,

Brian.