From: Phrogz Date: 2006-09-13T13:25:42+09:00 Subject: Re: Duplication from a Subclass, Object#become Gavin Kistner wrote: > So, I really want to use Element#clone, but it returns an REXML::Element > instance when called from my subclass, and I have no control over its > source code. FWIW, I found that I was able to do (typing from memory): class Foo < REXML::Element def clone klone = self.class.superclass.method( :new ).unbind.bind( self.class ).call( self ) # my stuff here klone end end ...but I think I'll probably end up re-writing my class to wrap/delegate to Element, instead of directly inheriting from it. Pity, from an rdoc standpoint.