On Tue, Mar 12, 2002 at 12:50:21AM +0900, Vladimir Dozen wrote:
>   Each file has definition of class with the same name, that's why
>   they can't be put in single file.

Not necessarily.  Does the following help you?

switch = true

if switch
  class Test
    def initialize
      puts "I'm the Test class that gets defined when switch is true"
    end
  end
else
  class Test
    def initialize
      puts "I'm the Test class that gets defined when switch is false"
    end
  end
end

Test.new


This is trivial, it will choose a class definition depending on a
boolean.  I guess the less trivial part is what to do before a require
in order to set that switch...  maybe a (gosh) global var:


$switch = true
require 'therecanbeonlyone'

Test.new


Massimiliano