Well, it is not so simple. Currently we check whether the file is
already in $". But it doesn’t get into the list until it’s execution is
The output is:
So we probably need another list/table of already loaded files. Besides,
a single file could be required multiple times - if you do $".clear
before calling require. I need to figure out what is exactly the
condition under which Ruby doesn’t load a file. Could you please file a
From: [email protected]
[mailto:[email protected]] On Behalf Of Wayne K.
Sent: Tuesday, May 13, 2008 10:23 PM
To: [email protected]
Subject: [Ironruby-core] require infinite loop
With the latest version, if a ruby source file requires itself, or if
there is a cyclic chain of requires so that the original source file is
required again - it results in an infinite loop.
This used to work correctly in the previous version - it simply requires
marking the file as already loaded prior to executing it.