Caleb Tennis wrote: > When using a singleton class (one that includes Singleton, not an > eigenclass), can anyone think of any advantage/disadvantage to using > class variables over instance variables (or visa versa) to access data > in the class? In answer to this question and the one about thread-specific singletons: another approach to consider is using a dependency injection framework. They all support singleton services, and at least some of them support services that return one unique object per thread. One disadvantage to using class variables (@@var) is that they are (in the current ruby) per-hierarchy, not per class. So a subclass will share the value of @@var. This is, I've heard, going to change in ruby 2.0. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407