I'm looking for an explanation of the following:
$ ruby -v
ruby 1.8.2 (2004-12-25) [i386-freebsd5]
$ cat ruby3.rb
load 'ruby4.rb', true
$ cat ruby4.rb
module M
end
include M
$ ruby ruby3.rb
./ruby4.rb:3:in `append_features': cyclic include detected (ArgumentError)
from ./ruby4.rb:3:in `include'
from ./ruby4.rb:3
from ruby3.rb:1:in `load'
from ruby3.rb:1
My understanding of load(filename,true) was that the code would be wrapped
inside an anonymous module, which I thought of as being like
module FOOBARrandom123456
... code goes here
end
But that doesn't explain the 'cyclic include' which running ruby3.rb gives
(but not running ruby4.rb by itself)
Thanks,
Brian.