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. On Apr 16, 2007, at 8:57 AM, Chad Perrin wrote: > I was surprised, while reading Satish Talim's ruby tutorial, to > discover > that main is actually a method -- at least, it is according to the > Open > Classes section of the tutorial: > > http://rubylearning.com/satishtalim/ruby_open_classes.html > > To quote: > > Please note that self.class refers to Object and self refers to > method > main. Therefore while running this program you are executing the > main > method of object Object. > > Is that correct? I would have thought main was an instance of Object, > and thus was an object itself, not a method of class Object. Using > Object.methods within irb doesn't list a main method, so I'm > skeptical. > > -- > CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] > Brian K. Reid: "In computer science, we stand on each other's feet." >