From: Bill Atkins Date: 2005-08-12T00:56:15+09:00 Subject: Re: Dynamically changing class methods How are you removing the method? On 8/11/05, henrikbrink wrote: > Hello! > > Im making an application that loads and uses the methods of a class > dynamically. The class can then be altered while the application is > running, and the application loads the file containing the class every > time it is needed. > > The strange thing is: It works fine when i add a method to the class. > The new method shows up. But if i remove a method, it acts as if it was > still there. How can that be? > > Here's the code used to get the methods: > > load "#{file}.rb" > myclass = Object.const_get "MyClass" > myclass_inst = myclass.new > methods = myclass_inst.methods > > If I am not clear enough, please ask. > > Regards, Henrik > > > -- Bill Atkins