From: Mathieu Bouchard Date: 2001-05-18T06:33:59+09:00 Subject: [ruby-talk:15345] Re: Newbie Module Mixin Issue On Fri, 18 May 2001, Steve Tuckner wrote: > I want to write a module that when mixed into another class finds out when a > new object of that class or sub-class is created. I thought of aliasing the > new method or some other such way but I don't know enough ruby to get his > done. Below is what I am thinking (this obviously doesn't work). Just a tip: don't mess with "new" unless you really know what you're doing. $object_list = [] module ObjectDB # *args is for "accept anything" def initialize(*args) $object_list.push self super end end matju