Re: Setting namespace in loaded files
- From: Eero Saynatkari <eero.saynatkari@xxxxxxxxxxx>
- Date: Tue, 22 Aug 2006 09:45:48 +0900
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/.
.
- References:
- Setting namespace in loaded files
- From: Luke Kanies
- Re: Setting namespace in loaded files
- From: khaines
- Re: Setting namespace in loaded files
- From: Eero Saynatkari
- Setting namespace in loaded files
- Prev by Date: Re: Setting namespace in loaded files
- Next by Date: Re: [BUG] thwait
- Previous by thread: Re: Setting namespace in loaded files
- Next by thread: Re: Setting namespace in loaded files
- Index(es):
Relevant Pages
|