On Aug 24, 6:48 pm, Joshua Peek <[EMAIL PROTECTED]> wrote: > If you have no confidence that "memoize :foo" does its job. How can > you have confidence in Foo.memoized_methods?
Umm... I do have confidence in "memoize :foo" doing its job, Josh. Which is precisely what I'm saying. Grep-ing through source is plainly a crap way. Having "memoize :foo" store the fact that :foo is :memoized will; a) allow me to spec against it b) stop the "unmemoize_all" code having to grep through instance_methods > memoization *is* an implementation detail. The helper should not be > treated any different than > > def foo > @foo ||= 1 + 1 > end Indeed, except you get extra stuff in there for free, like reloading, and it claims to take care of arguments. (although I worry that any function like do_something(true) will instead just unmemoize itself) Will get my laptop out, see what I can do to make a patch. Have a good bank holiday (if you're in the UK WHOOP WHOOP) :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
