summaryrefslogtreecommitdiff
path: root/jni/ruby/benchmark/other-lang/fib.rb
blob: ec587eabe02c9101a97e232f496de69772197efa (plain)
1
2
3
4
5
6
7
8
9
def fib n
  if n < 3
    1
  else
    fib(n-1) + fib(n-2)
  end
end

fib(34)