[Newbies] 1-way #become: ?

itsme213 itsme213 at hotmail.com
Tue Feb 19 03:59:47 UTC 2008

#become: apparently (effectively) swaps object ids.

Is there anything like
    x oneWayBecome: y
that would pass this test:

testOneWayBecome: x to: y
    | a b |
    a := x.
    b := y.
    x oneWayBecome: y.
    self assert: [x == y].
    self assert: [a == y].
    self assert: [b == y].

(Not related to my earlier collection empty question)

Thanks - Sophie

More information about the Beginners mailing list