* transcode.c (econv_init): accept Encoding object as source_encoding
[ruby-svn.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");