From: Sebastian Hungerecker Date: 2008-07-24T19:39:07+09:00 Subject: Re: circular 'require' Shadowfirebird wrote: > # root.rb > require 'customer' > class Root >    @@list = [] > >    def self.create_data() >       Customer.new("Dolly") >       Customer.new("Reymond") >    end > >    def self.customers() >       return @@list.find_all{|x| x.kind_of?(Customer)} >    end > >    attr_accessor :oid > >    def initialize() >       @oid = @@list.size >       @@list << self >    end > end > > # customer.rb > require 'root' > class Customer < Root >    attr_accessor :name > >    def initialize(name) >       super() >       @name = name >    end > end Just leave out the require 'root' and the whole thing will work. You're making things out to be way more complicated than they are. There is no need to require the file that requires you. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826