help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] quick compile fail: ScaledDecimal>>#asFraction


From: Stephen Compall
Subject: [Help-smalltalk] quick compile fail: ScaledDecimal>>#asFraction
Date: Tue, 14 Nov 2006 18:53:22 -0600

Was paging through make output for smalltalk--devo--2.2--patch-178 and
spotted a weird error message that nevertheless didn't break the
compile.

st> (ScaledDecimal whichClassIncludesSelector: #asFraction) printNl!            
nil

Relevant method from kernel/ScaledDec.st:

asFraction                                                                      
    "Answer the receiver, converted to a Fraction"                              
    | num denom |                                                               
    denom := 10 raisedToInteger: scale.                                         
    num := fraction numerator * denom quo: fraction denominator.                
    gcd := num gcd: denom.                                                      
    ^Fraction numerator: num / gcd denominator: denom / gcd!

gcd isn't declared.  The rest of the methodsFor: 'coercion' seem to be
intact.  (I also see looking at the log that this appeared yesterday :)

-- 
Stephen Compall
http://scompall.nocandysw.com/blog
##smalltalk,#gnu-smalltalk on Freenode IRC

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]