From: Brian Buckley Date: 2005-11-10T00:42:16+09:00 Subject: Re: memoize and yaml > Overriding methods usually produces warnings. It's best to remove the > methods first. I was wondering if warnings might be the motive. I am glad to get confirmation. > Actually, I think this is the cleanest solution. In theory you could > also offer a custom append_features() which defines the methods on the > class or module including Memoize itself. That's more complex and not as > easy to understand, though, in my opinion. Cool. I had been thinking I wanted to use your version of Memoize in conjunction with Rails' ActiveRecord::Base but ActiveRecord::Base requires one to 'extend' it to use it. However it occurred to me that since ActiveRecord::Base does not extend anything I could just extend it instead of my actual class. It seems to work. class ActiveRecord::Base extend Memoize end class Foo < ActiveRecord::Base def calc ... end memoize :calc end --Brian Buckley