On Sunday 12 September 2004 07:10 am, Robert Klemme wrote: > "trans. (T. Onoma)" <transami / runbox.com> schrieb im Newsbeitrag > > module Kernal > > > > def metaclass > > (class << self; self; end) > > end > > > > def metaclass_eval(&block) > > (class << self; self; end).class_eval(&block) > > end > > > > def define_singleton(meth, &block) > > metaclass_eval { define_method(meth, &block) } > > end > > > > end > > Good! I'd just put it into class Object instead of module Kernel. That's > a more appropriate place IMHO. Also "metaclass" seems the wrong term in > this case, although I can see why you didn't want to use > "singleton_class"... Agreed. Better name? -- ( o _ // trans. / \ transami / runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain