June 22, 2017
4:40 p.m.
On 22 Jun 2017, at 17:39, Raffaello Giulietti <raffaello.giulietti@lifeware.ch> 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.