From: Kev Jackson Date: 2005-10-28T13:57:14+09:00 Subject: Re: Stuck with modules/classes/inheritance Kev Jackson wrote: > In lib/b.rb, you need to write: > >> require "base" >> module A >> class B < Base >> end >> end >> >> otherwise your code in b.rb isn't aware of base.rb, and thus doesn't >> know about A::Base. > > > require 'base' > > causes > > ./lib/b.rb:1:in `require': No such file to load -- base (LoadError) > from ./lib/b.rb:1 > from test.rb:1:in `require' > from test.rb:1 > > which is weird as I have done this before with other files, it's just > this one that it won't find > in fact from test.rb, I can require 'lib/base', but from b.rb I can't require 'base' (with b.rb and base.rb in the same directory) - this is very strange behaviour Kev