Mantis - Squeak
Viewing Issue Advanced Details
7262 Network minor always 01-06-09 15:11 08-21-10 09:47
luki  
cdegroot  
normal  
assigned 3.10.2  
open  
none    
none  
0007262: UUID class>>fromString36: fails when reading a small value, e.g. nilUUID
self
    shouldnt: [UUID fromString36: (UUID nilUUID asString36)]
    raise: Error.
UUID class>>fromString36: should use "num digitLength" instead of "num size" as #size fails when sent to SmallIntegers.
 M7262-UUID-class-fromString36.1.cs [^] (669 bytes) 01-06-09 15:28
 M7262-UUID-class-fromString36-Test.1.cs [^] (544 bytes) 01-06-09 15:29

Notes
(0013834)
nicolas cellier   
08-21-10 09:29   
Good catch thank you!

code could simply be:

  1 to: (16 min: num digitLength) do: [:i | object at: i put: (num digitAt: i)].

but since (2 digitAt: 15) also works well, we can just say:

  1 to: 16 do: [:i | object at: i put: (num digitAt: i)].
(0013835)
nicolas cellier   
08-21-10 09:47   
Fixed in trunk http://source.squeak.org/trunk/SMBase-nice.112.mcz [^]
I don't know where to load the tests yet, because they should belong to SM package (Squeak Map)