From: Eero Saynatkari Date: 2006-08-22T09:45:48+09:00 Subject: Re: Setting namespace in loaded files Eero Saynatkari wrote: > unknown wrote: >> On Tue, 22 Aug 2006, Luke Kanies wrote: >> >>> Is there a way to load a file within an existing namespace, so that the >>> method search path started at the scope doing the loading? >> >> If you read the file, and then eval it in the desired scope, it has the >> effect of loading it into that scope. > > There is some complexity/problem with this but > the details elude me. Came up when implementing > the require 'foo', MyNamespace thingy. Note to self, Enter does not do the same thing as Ctrl-z. The problem was that extending existing classes etc. would cause issues since they would be also enveloped in the new namespace. So this is only an issue for general-purpose programming. >> Kirk Haines -- Posted via http://www.ruby-forum.com/.