Operator precedence. You're effectively doing this:
[0, 1].include? (n ? n : fib...)
That is, the result of n ? n : (fib(n-1) + fib(n-2))
is found, and that is passed to include?
.
Use parenthesis to force the order of evaluation you intend:
[0, 1].include?(n) ? n : (f(n - 1) + fib(n - 2))