From: Zhao Yi Date: 2009-01-21T10:49:41+09:00 Subject: Re: Ruby namespace question Ryan Davis wrote: > On Jan 20, 2009, at 17:11 , Zhao Yi wrote: > >> I require two ruby files which include two classes with the same name. >> how can I specify which class I use? > > class X; end # x.rb > class X; end # y.rb > > same class, only one to specify. Files mean nothing in ruby, they're > just vehicles for the parser. For this code: require 'x.rb' require 'y.rb' X.new #which class it uses, can I specify the class like x.X or y.X? -- Posted via http://www.ruby-forum.com/.