diff -r aaf80a17225f -r 812f06b423b5 Fraction.st --- a/Fraction.st Thu Feb 18 07:01:58 2016 +0100 +++ b/Fraction.st Tue Feb 23 06:56:08 2016 +0100 @@ -1,5 +1,3 @@ -"{ Encoding: utf8 }" - " COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved @@ -181,25 +179,24 @@ "/ sigh - care for subclasses... self == Fraction ifFalse:[ - ^ super readFrom:aStringOrStream onError:exceptionBlock + ^ super readFrom:aStringOrStream onError:exceptionBlock ]. s := aStringOrStream readStream. s skipSeparators. - s peek == $( ifTrue:[ - s next. - + s peekOrNil == $( ifTrue:[ + s next. ]. numerator := super readFrom:s onError:[^ exceptionBlock value]. numerator isInteger ifTrue:[ - s skipSeparators. - (s peek == $/) ifTrue:[ - s next. - denominator := Integer readFrom:s onError:[^ exceptionBlock value]. - ^ self numerator:numerator denominator:denominator - ]. - ^ numerator + s skipSeparators. + (s peekOrNil == $/) ifTrue:[ + s next. + denominator := Integer readFrom:s onError:[^ exceptionBlock value]. + ^ self numerator:numerator denominator:denominator + ]. + ^ numerator ]. ^ numerator asFraction