On 20 July 2017 at 00:16, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Bert,

On Wed, Jul 19, 2017 at 6:10 AM, Bert Freudenberg <bert@freudenbergs.de> wrote:
#[195 164] collect: [:c | c hex]
=> #[16 16]

+1

at: index put: value 
<primitive: 61> "try primitiveAtPut, convert value to integer if that fails and try again" 
^ self byteAt: index put: value asInteger

is wrong.
 

I think this should have raised an error. Tim?

Why don't we simply remove the method? Tim may be using this in his benchmarks but I'm sure there's a better way.

But there's possibly another error here too.  Why is '16rC3' asInteger 16 instead of 195?

indeed. And that has nothing to do with bytearray method.
 

_,,,^..^,,,_
best, Eliot






--
Best regards,
Igor Stasenko.