I’m not sure if this is a case, but there is deepCopy and veryDeepCopy, maybe 
you should take a look at that.

Uko

> On 05 Nov 2014, at 18:04, Mark Rizun <mri...@gmail.com> wrote:
> 
> Hi everyone,
> 
> I want to get a deep copy of ast. But deepCopy doesn't work:)
> What I mean:
> 
> | ast1 ast2 |
> ast1 := RBParser parseRewriteExpression: 'self'.
> ast2 := ast1 copy."or without copy"
> ast1 stop: 99.
> ast2 stop
> 
> When evaluate this you get 99. I want it to be 4.
> So I want to have separate object ast2 with separate data, not depending on 
> changes made in ast1.
> As I said deepCopy doesn't work. Any ideas?
> 
> Thanks,
> Mark


Reply via email to