[Vm-dev] Why "object becomeForward: 3" is not working?

Denis Kudriashov dionisiydk at gmail.com
Mon Mar 21 16:47:46 UTC 2016


2016-03-21 16:14 GMT+01:00 Bert Freudenberg <bert at freudenbergs.de>:

> No, it will break. If the hash changes, the lookup very likely fails
> because it is looking at the wrong index (even though the object is in the
> dictionary).
>
> You need to send #rehash to the dictionary to fix this.
>
> Of course this only applies if the object was used as key. Curious: what
> are you actually trying to do?
>

I implemented new version of Mocketry which will return new mocks for any
unexpected message. And in the case when this resulted mock will be used in
arithmetics I will substitute it with zero as default number value. Same
logic I apply for boolean operations where returned mock is substituted by
false when mustBeBoolean is detected.

It should be correct behaviour for usual mock scenarios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160321/27f60353/attachment.htm


More information about the Vm-dev mailing list