From: Zhao Yi Date: 2009-01-05T18:03:04+09:00 Subject: Re: How can I prevent require duplicate files Phlip wrote: > > I don't know about all cases but I suspect the biggest culprit is > require 'foo' > twice with different paths. > > If you have a Rails project, it has a Magic Loader that automagically > loads the > file foo.rb if the interpreter sees a Foo reference and has not seen a > definition for Foo yet. This is a miracle and a pain in the butt, > because a > subsequent require 'foo' line might not have the same path, and you get > the > double-require issue. > > That's a total hack, but it works well enough. But there is only one file named foo.rb, how could require 'foo' happen? Is there a way to avoid printing the warning message? -- Posted via http://www.ruby-forum.com/.