Ruby Fibonacci(n) recursive computation optimized with reflection
considering that this is Code Review, I have to say that you probably don't want to use an instance variable. You expose the internal data, and any user could destroy the workings of your method inadvertently. In Ruby 1.9, Ruby added a very interesting feature for just these types of situations that involve infinite sequences. It's called a Fiber.

It's true that Fibers aren't perfect for situations where you have to go backwards in the sequence in addition to forward. 

Another option for this is to put the data in a module:

module Fibonacci
  @fib=[0,1,1]
  def self.fib_array(n)    
    @fib[n] ||= fib_array(n-2) + fib_array(n-1)
  end
end


And use it like so:

Fibonacci.fib_array(42)