From: Phillip Hutchings Date: 2006-06-22T08:01:48+09:00 Subject: Re: Class Names On 6/22/06, Aaron Patterson wrote: > Hi, I was wondering how I can reffer to a class outside of my class, but > it has the same name. Hopefully the following code will make it more > clear: > > module Test > class File > def print_file > # I don't want to call Test::File.open here: > File.open('test.rb', "r") { |f| puts f.read } > end > end > end > > Test::File.new().print_file > > > Prefix with ::, eg ::File.open. -- Phillip Hutchings http://www.sitharus.com/