From: Austin Ziegler Date: 2005-11-09T00:44:05+09:00 Subject: Re: Object#clone missing documentation >> * the discussion under Object#clone. In general, >> * clone and dup may have different semantics >> * in descendent classes. While clone is used to duplicate >> - * an object, including its internal state, dup typically >> - * uses the class of the descendent object to create the new instance. >> + * an object, including its internal state (and any singleton methods), >> + * dup typically uses the class of the descendent object to >> + * create the new instance. > Mm, not quite sure that is clear enough.. if you want to draw a direct > parallel to #dup, perhaps something like > "While both #dup and #clone duplicate the content of an object, #clone actually > does more by duplicating the object's entire state including singleton methods, > taintedness and whether the object is frozen." The text should be tighter than that. + * an object, including the entire internal state (including singleton + * methods, taintedness, and frozenness). By contrast, + * dup typically uses the class of the descendent object + * to create the new instance. -austin