« Return to Thread: Block Equality?

Re: Block Equality?

by Keithy :: Rate this Message:

Reply to Author | View in Thread

Ok spoke too soon..

BlockContext>>#= other

    self class == other class ifFalse: [^ false].
    self home receiver == other home receiver ifFalse: [^ false].
    self home selector == other home selector ifFalse: [^ false].
    ^ self startpc == other startpc

If I am handed two block contexts that are defined in the same place and
have the same contents etc then identiy comparison returns false. the
above works.

Are you saying that defining #= on BlockContext like this is wrong or
will break something?

thanks in advance

Keith

p.s. it would help to know because I am finding it rather useful


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

 « Return to Thread: Block Equality?

LightInTheBox - Buy quality products at wholesale price