From: Brian Candler Date: 2010-09-28T15:11:29+09:00 Subject: Re: error message, undefined method in Set Iain Barnett wrote: > but this throws errors: > > require 'choice' > require 'set' Then at the top of choice.rb I'd put require 'set'. > I'm very surprised that the order of requires (at the top of a file) can > affect anything in this way. Is this the way it's supposed be? If not, > what could be the cause? It can be. Imagine this: --- set.rb --- class Set < Hash ... end --- choice.rb --- class Set ... add some more methods to the class end If you require choice.rb first, you would get an exception when requiring set.rb -- Posted via http://www.ruby-forum.com/.