Memoizable private instance methods

Hi all,

what do you guys think of making ActiveSupport::Memoizable aware of
the private keyword? Currently, if you memoize :a_method, the a_method
newly defined by Memoizable will always be public.

I've put an exemplary patch up on lighthouse which causes the re-
definition of a_method to be prepended by the private keyword if the
original a_method had been private.

I think the implementation is solid but of course the question arises
whether such behaviour is desired or not in the first place. What are
your opinions on this?

Ticket & patch are at


I think the fact that the private status is lost when being memoized
is misleading and confusing. Until reading this post I had no idea
that was the case and would have assumed it respected the private