[squeak-dev] Re: [bug] xor: is this an old bug or what?

Michael van der Gulik mikevdg at gmail.com
Tue Mar 24 01:28:35 UTC 2009


On Tue, Mar 24, 2009 at 2:22 PM, Andreas Raab <andreas.raab at gmx.de> wrote:

> Keith Hodges wrote:
>
>> true xor: [ true ]  => true
>>
>
> I don't think it's a bug. Unless you want to sprinkle lots of code with
> type tests, the result is whatever the implementation says, in this case:
>
> xor: aBoolean
>        "Exclusive OR. Answer true if the receiver is not equivalent to
> aBoolean."
>
>        ^(self == aBoolean) not
>

IMHO Should be:

xor: aBoolean
       "Exclusive OR. Answer true if the receiver is not equivalent to
aBoolean."

       ^(self = aBoolean value) not

With Object>>value returning self.

Gulik.

-- 
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090324/0f43b5c2/attachment.htm


More information about the Squeak-dev mailing list