From: Mike Stephens Date: 2009-03-16T02:20:16+09:00 Subject: Re: Basics of Require Ken Bloom wrote: > > def method > require 'foo' > end > > only loads 'foo' when you call the method. The contents of 'foo' are > visible globally. (Unlike a #include in C) > > module Foo > require 'foo' > end > > class Foo > require 'foo' > end > > These are exactly the same. They both load 'foo', and the contents of > 'foo' are NOT wrapped in the module or class Foo. I can't see the logic there. You're saying if the require is inside a method, Ruby will not doing anything until your program calls that method. However if the require is inside a class, Ruby will go and fetch the code before you ever refer to that class? -- Posted via http://www.ruby-forum.com/.