From: "Mauricio Fernández" Date: 2003-11-30T18:38:20+09:00 Subject: Re: Underpinnings of Method Wrapping On Sun, Nov 30, 2003 at 11:53:25AM +0900, T. Onoma wrote: > But I'm getting ahead of myself. I need to explain the point. Lets take this > example: > > class Classic > def x > print "X" > end > end > c = Classic.new > def c.x > print "(" > super > print ")" > end > c.x; puts # => (X) This works fine with singletons, but there is a problem if you want to do it for "normal" instance methods (i.e. wrapping the method for all objects of a given class), see [ruby-talk:75334] for an explanation and [ruby-talk:75290] for an implementation using an explicit indication "plz make this method available with super after redefinition". -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Never make any mistaeks. -- Anonymous, in a mail discussion about to a kernel bug report