From: shadowfirebird@... Date: 2008-08-01T23:38:55+09:00 Subject: Re: About circular dependencies in RubyGems (the library). And about the order in $". Sure. Assuming you keep each class in a seperate file: require 'person' #require 'employee' # this is not necessary class Accountant < Person def initialize() @payrollid = Employee.getnewid() end end Of course, for the code to work, then somewhere in your application, *some* file must require employee. If you want to make sure that each file will require everything that it will need at runtime -- for example, if you are going to do unit testing -- then one solution is to do this: require 'person' class Accountant < Person require 'employee' def initialize() @payrollid = Employee.getnewid() end end On 8/1/08, Erik Veenstra wrote: >> I didn't need to require if the object in question was >> referenced inside a method definition. > > Could you please elaborate? > > Thanks. > > gegroet, > Erik V. - http://www.erikveen.dds.nl/ > -- Me, I imagine places that I have never seen / The colored lights in fountains, blue and green / And I imagine places that I will never go / Behind these clouds that hang here dark and low But it's there when I'm holding you / There when I'm sleeping too / There when there's nothing left of me / Hanging out behind the burned-out factories / Out of reach but leading me / Into the beautiful sea