Benjamin Hepp <benjamin-hepp / t-online.de> wrote: > Hello, > > I'm trying to build a module-mechanism in ruby so that I am able to > load a ruby-file without cluttering up the global namespace of the > program. > > For example I want to be able to load a ruby-file, search for methods > in it, possibly execute one of them and then "unload" the file. When > I call Kernel#load with wrap = true, everything of the new file is > put into an anonymous Module, but every other file loaded in the new > file itself is put into the global namespace again. > > My questions: > > Is it at all possible to prevent this? If so, how to do it? > Can I access the anonymous Module in an easy manner? > How to delete/undefine a class or a method? > > Thanks in advance > Benjamin Hepp I wonder why noone mentioned Kernel#load so far: http://www.ruby-doc.org/core/classes/Kernel.html#M001744 Did I overlook something? Kind regards robert