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 keyword.
Andrew On Mar 5, 12:53 pm, Niels Ganser <[email protected]> wrote: > 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 > athttp://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/21... > > Best, > Niels --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
