From: "jonathan " Date: 2005-12-08T15:39:06+09:00 Subject: Re: injecting dynamic methods into a class matz wrote: > I thought we were talking about so called singleton classes, right? > It's totally different from static classes in C# and C++. Well, I thought we were talking about classes which contain only class methods and class data (which are currently called 'singletons'). But, in C# or C++ these are called 'static classes.' I guess that makes sense for them because the code itself can never change or be enhanced (like it can be in Ruby). > Singleton classes in Ruby are: > > * created run time on demand > * can be modified (or enhanced) run time > * their methods may modify any instances > * their scope are not limited to certain file > > matz. Ok. That's what I meant by metaprogramming. I wasn't aware of the scope issue though. Also, what do you mean by 'their methods may modify any instances'? But, yea, given the 'dynamic' nature of Ruby, it doesn't make sense to say something is static. --Jonathan -- Posted via http://www.ruby-forum.com/.