[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / sample / fib.rb
blobcde4fba0825cff0ddf4cb9e940b042e2cdebe50b
1 # calculate Fibonacci(20)
2 # for benchmark
3 def fib(n)
4   if n<2
5     n
6   else
7     fib(n-2)+fib(n-1)
8   end
9 end
10 print(fib(20), "\n");