Fix for JRUBY-2882. Handle error messages related to constructors better
[jruby.git] / bench / shootout / fibo.ruby
blobc0d56ea9fc5c7d9b141e4bf415614fc91bb84cfb
1 #!/usr/bin/ruby
2 # -*- mode: ruby -*-
3 # $Id: fibo.ruby,v 1.3 2005-04-25 19:01:38 igouy-guest Exp $
4 # http://www.bagley.org/~doug/shootout/
6 def fib(n)
7 if n < 2 then
9 else
10 fib(n-2) + fib(n-1)
11 end
12 end
14 N = Integer(ARGV.shift || 1)
15 puts fib(N)