thrift/lib/rb/benchmark/thin_server.rb
# 1-based index into the fibonacci sequence
1-based index into the fibonacci sequence
1 - based index into the fibonacci sequence
def fibonacci(n)
    seq = [1, 1]
    3.upto(n) do
      seq << seq[-1] + seq[-2]
    end
    seq[n-1] 
  end
def fibonacci ( n ) seq = [ 1 , 1 ] 3 . upto ( n ) do seq << seq [ - 1 ] + seq [ - 2 ] end seq [ n - 1 ] end
1-based index into the fibonacci sequence
1 - based index into the fibonacci sequence
# n is 1-based
n
<not_specific>