DDMemoize adds support for memoizing Ruby functions.