From: nobu.nokada@... Date: 2002-04-17T10:22:17+09:00 Subject: Re: Redefining module methods Hi, At Wed, 17 Apr 2002 10:04:22 +0900, Sean O'Dell wrote: > Here's a snippet of code I can't get to work properly, but which I'm sure is > close to what I want to do: > > def Module::testmethod() > print("test 1\n") > end > > methodptr = method(:testmethod) > undef_method(:testmethod) > > def Module::testmethod() > print("test 2\n") > end > > testmethod() > methodptr.call() Although I'm not sure what do you want exactly, how about this? def Module::testmethod() print("test 1\n") end methodptr = Module.method(:testmethod) class << Module undef_method(:testmethod) end def Module::testmethod() print("test 2\n") end Module.testmethod() methodptr.call() -- Nobu Nakada