> On 22 Jun 2017, at 17:39, Raffaello Giulietti 
> <[email protected]> wrote:
> 
> Hi,
> 
> the current (Pharo 6) code reads
> 
> ^(self integerAt: byteOffset size: 1 signed: false) == true
> 
> so it always returns false, as no integer is identical to true.
> 
> 
> Instead, it should read
> 
> ^(self integerAt: byteOffset size: 1 signed: false) ~= 0
> 
> implementing the usual convention that 0 maps to false and every other value 
> maps to true.
> 
> Greetings
> Raffaello

Good catch, probably a typo.

IMO, there should have been unit tests to validate such code.



Reply via email to