From: Eero Saynatkari Date: 2006-01-21T07:02:58+09:00 Subject: Re: Basic Inheritance questions {noob alert:- pickaxe ed. 2, John Maclean wrote: > Thanks for that speedy reply. I've decided to require the within the > child. One thing to note is that when I do require the child irb shows > the following.. > > cat fx/ruby/chap3/class_KaraokeSong.rb > > #!/usr/bin/env ruby > require 'class_Song.rb' > > # test if this class has been loaded correctly > Object.const_defined?(:Song) > > class KaraokeSong < Song > def to_s > super + " [#@lyrics]" > end > end > > irb(main):011:0> require 'class_KaraokeSong.rb' > => false Getting a 'false' in irb means the file is already loaded (a LoadError would be raised if the file could not be found); if you want, you can use load 'song.rb' This will reload the file each time (seldomly necessary). As a compatibility-note, you could make your filenames all lowercase_and_underscored. This will thwart any case sensitivity issues. E -- Posted via http://www.ruby-forum.com/.