From: ts Date: 2003-06-11T19:42:02+09:00 Subject: Re: Stack Frames, Functions and Variables. >>>>> "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 ? svg% cat b.rb #!/usr/bin/ruby require 'hooks.rb' module A define_hook(:length) do puts "A#length" prior end end class String include A define_hook(:length) do puts "I'm calculating the length" prior end end str = "abcde" x = str.length puts x svg% svg% b.rb ./hooks.rb:65: warning: instance_methods parameter will default to 'true' in Jan 2004 ./hooks.rb:58:in `class_eval': (eval):1:in `class_eval': undefined method `length' for module `A' (NameError) from ./hooks.rb:58:in `class_eval' from ./hooks.rb:58:in `define_hook' from ./b.rb:5 svg% Guy Decoux