[Glass] [3.1.0.4] Set>>deepCopy
Ken Treis
ken at miriamtech.com
Wed Jul 17 23:12:17 PDT 2013
In 3.1.0.4:
> (Set with: 1) deepCopy
… gives me an empty Set. I have worked around it by adding the following method to Set:
> deepCopyWith: copies
> | copy |
> copy := copies at: self otherwise: nil.
> copy ifNotNil: [^copy].
> copy := self class new.
> copies at: self put: copy.
> self do: [:each | copy add: (each _deepCopyWith: copies)].
> ^ copy
Doubtless it's the wrong way to do it, but it got my tests passing.
--
Ken Treis
Miriam Technologies, Inc.
(866) 652-2040 x221
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20130717/80fe1875/attachment.html>
More information about the Glass
mailing list