Fraction.st
branchjv
changeset 19242 812f06b423b5
parent 18873 ce58d469e583
parent 19241 87e64d3a8410
child 19250 a93b96b49985
--- 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