On Tue, Dec 23, 2008 at 02:14:52AM +0900, Charles Oliver Nutter wrote: > Paul Brannan wrote: >> I don't think circular dependencies are a good idea in general, though >> Ruby shouldn't break if someone tries. > > It's not so much that they intend to be circular; more it's that many > files re-require all resources they expect to need, which over time can > result in circular dependencies (if every script requires everything it > things it needs, it's almost assured a few of those will have reverse > dependencies back). > > file_one.rb > > require 'file_two' > require 'file_three' > require 'file_four' > > module Foo .... > > file_three.rb > > # I know I need file_one to be loaded so module Foo is available... > require 'file_one' > > class Blah; include Foo ... I'm still having trouble imagining a case where code like the above is not a bug. Paul