ts <decoux / moulon.inra.fr> writes: > >>>>> "D" == Dave Thomas <Dave / PragmaticProgrammer.com> writes: > > D> I must be particularly dumb today. Why does this need to be caught at > D> all. Unless $" is not getting updated, won't the loop be broken the > D> second time you try to load the same file? > > What do you do with this ? > > pigeon% cat r1.rb > require "r2" > class R1 > include R2 > end > pigeon% > > pigeon% cat r2.rb > require "r1" > module R2 > end > > class R3 < R1 > end > pigeon% I dependency problems, but is it a Ruby interpreter problem? > The problem with "load" actually is here > > * autoload should work with threads [ruby-talk:4589] > > the parser is not thread-safe, and 2 differents threads must not try to > load the same file. OK, but does that mean we need explicitly to detect require loops? Assuming the $" behavior works (or can be made to work), is the reason for the test simply to detect potential bad style in the programs being loaded, or is there something deeper here? Regards Dave