From: Alva Date: 2001-09-18T22:12:33+09:00 Subject: [ruby-talk:21312] Name clashes Hi all, I'm writing a small game using the RUNIT framework. I use some mock objects here and there. Now suppose i've created main test script that looks like this: require runit stuff... require 'testgame' require 'testplayer' require 'testblahblah' ... test_cases = [GameTest, PlayerTest, ...] all_tests = TestSuite.new test_cases.each do |testcase| all_tests.add_test(testcase.suite) end run the tests Now in some files I have defined MockPlayer classes. They have same name, albeit do diffrent things. What happens when I require these files - methods in MockPlayer class get subsquently overwritten by consecutive 'requires'. And it obviously doesn't work. So my temporary solution was to rename MockPlayer to GameMockPlayer, CmdMockPlayer, MapMockPlayer etc... This is ugly. Is there an elegent way to solve this? Pozdrawiam, Tomek 'Alva' Wr�blewski -- r e k l a m a Lista P�ac [ http://listaplac.onet.pl ]