From: Kare Tempo Date: 2001-06-28T04:53:15+09:00 Subject: [ruby-talk:16978] Catching object creation Hi, I'm a new Ruby user and I'd like to know if there is some way to catch *ALL* object creations. I've seen the pickaxe book and figured I might use something like: class Class alias old_new new @@c = Hash.new(0) def new(*args) @@c[self] += 1 old_new(*args) end end but it doesn't work. Is it because many classes override new without calling the one above? Other ways to catch object creations? Any way to catch object created internally in the interpreter? I guess not?! Regards, Kare -- _______________________________________________ FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup FREE PC-to-Phone calls with Net2Phone http://www.net2phone.com/cgi-bin/link.cgi?121