3 # $Id: except-ruby.code,v 1.4 2004/11/13 07:41:33 bfulgham Exp $
4 # http://www.bagley.org/~doug/shootout/
8 NUM = 250000 # Integer(ARGV[0] || 1)
11 class Lo_Exception < Exception
17 class Hi_Exception < Exception
23 def some_function(num)
27 print "We shouldn't get here, exception is: #{$!.type}\n"
49 raise Lo_Exception.new(num)
51 raise Hi_Exception.new(num)