From: Ken Bloom Date: 2007-08-09T23:10:07+09:00 Subject: Re: Deep Clone of array? On Thu, 09 Aug 2007 17:13:09 +0900, Ronald Fischer wrote: > Is there a standard way of doing a deep copy of an object (in > particular, of an array)? > > http://www.ruby-doc.org/core/classes/Object.html#M000379 mentions a > function 'dclone', > but this doesn't seem to exist: > > undefined method `dclone' It's annoying -- the ruby-doc core documentation includes all of the standard library, so it's hard to tell what comes from where. (Perhaps they can regenerate the documentation?) Anyway, if you click on the function name, you'll see the source code: # File lib/rexml/xpath_parser.rb, line 8 def dclone clone end -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/