From: Chad Perrin Date: 2007-04-16T13:20:51+09:00 Subject: Re: Is main an object or a method? On Mon, Apr 16, 2007 at 10:14:49AM +0900, John Joyce wrote: > indeed, main is a method of class Thread > check it with ri > ri main > gives you > Thread.main > which returns the main thread for the process. > > self is the current object, a synonym if you will. > Defined as the receiver object of the current method. Roseanne's evidence seems to corroborate my impression -- that main (in the context of the main scope of a Ruby program) is an object of type Object, not a method. I believe the Thread.main method is a method that just happens to have the same name as the main instance of Object. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "The ability to quote is a serviceable substitute for wit." - W. Somerset Maugham