Mantis - Squeak
Viewing Issue Advanced Details
7667 Kernel minor always 09-07-11 11:26 09-08-11 14:16
FrankShearar  
FrankShearar  
normal  
resolved  
fixed  
none    
none  
0007667: ScaledDecimal newFromNumber: 0.0 scale: 0 can't print
Evaluate the following:

0s0 "=> 0s0"
ScaledDecimal newFromNumber: 0 scale: 0 "=> 0s0"

0.0s0 "=> 0s0"
ScaledDecimal newFromNumber: 0.0 scale: 0 "=> MNU: SmallInteger doesn't understand printTruncatedOn:showingDecimalPlaces:"

The MNU happens because in ScaledDecimal class >> #newFromNumber:scale: we say

    "..." aNumber asFraction "..."

and when aNumber = 0.0, aNumber asFraction = 0, which is a SmallInteger and not a Fraction.

Notes
(0014184)
FrankShearar   
09-08-11 14:16   
Nicolas Cellier fixed this: Kernel-nice.614.mcz