From: Jim Freeze Date: 2005-05-01T04:58:23+09:00 Subject: Re: instantiating metaclasses, sorta [Was: determining when inside 'class << self'] * Mark Hubbart [2005-04-30 16:35:16 +0900]: > While experimenting with this, I discovered something interesting: it > is possible to instantiate a metaclass. By duping a metaclass, you > regain the ability to instantiate it, apparently without losing any > functionality. As is said later, duping the object 'erases' the singleton methods while 'cloning' carries them over. I've always considered duping as a nice way of erasing the 'specialness' of an object while returning it to its natural state. o = Object.new def o.inspect; `clear`; end p o # clears the screen o = o.dup p o # # Try this in irb (but you don't need the 'p's) -- Jim Freeze Code Red. Code Ruby