From: Yukihiro Matsumoto Date: 2005-12-08T11:29:33+09:00 Subject: Re: injecting dynamic methods into a class Hi, In message "Re: injecting dynamic methods into a class" on Thu, 8 Dec 2005 11:22:02 +0900, "jonathan " writes: |How do you all think the term 'static class' fits? Nope, just because it's not static at all. |How do you actually implement the singleton pattern in Ruby? Not being |able to return a self ptr from initialize seems to stump me. Four ideas: * A plain object + singleton methods * A module with singleton methods * singleton library in the standard libraries * An ordinary class and pre-allocated object with convention not to create any other objects. matz.