From: Brian Candler Date: 2003-05-09T22:09:59+09:00 Subject: Re: Can a global be a constant? On Fri, May 09, 2003 at 09:14:58PM +0900, Jim Freeze wrote: > Hmm, associated singleton class seems weird to me. > Why does an object (in this case a class object) > have an associated singleton class? Don't objects > just have single methods added to them? The singleton methods are added into the object's singleton class. You can actually get hold of a reference to the singleton class, with a little trickery, which proves it's a separate object. I wrote this up, see http://www.rubygarden.org/ruby?SingletonTutorial and skip down to "Advanced: how to get hold of a singleton class" Cheers, Brian.