The memoize library allows you to cache methods for Numerics (Integer/Float) in Ruby >= 2.0.0.
>= 1.9.0
antimon2