From: Robert Klemme Date: 2003-06-11T23:32:12+09:00 Subject: Re: Stack Frames, Functions and Variables. "ts" schrieb im Newsbeitrag news:200306111041.h5BAftC20368@moulon.inra.fr... > >>>>> "R" == Robert Klemme writes: > > R> The Wiki link is > R> http://www.rubygarden.org/ruby?MethodHooks > > Well, your code has a problem with this, no ? Yes, because you define the hook before the original method is defined. If I find the time, I might try a second version that solves this problem. After all this was just an explorative study and not production code. Anyway, thank's for pointing that out. > svg% cat b.rb > #!/usr/bin/ruby > require 'hooks.rb' > > module A > define_hook(:length) do > puts "A#length" > prior > end > end Cheers robert