[squeak-dev] The Trunk: Kernel-nice.248.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Kernel-nice.248.mcz

commits-2
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.248.mcz

==================== Summary ====================

Name: Kernel-nice.248
Author: nice
Time: 19 September 2009, 9:37:42 am
UUID: 89aa20e5-8219-d040-84bc-b10594ff152e
Ancestors: Kernel-nice.247

Fix for http://bugs.squeak.org/view.php?id=6695
Float storeStringBase: does not store the radix
Since Integer and Fraction do store the radix, no reason to differ...

=============== Diff against Kernel-nice.247 ===============

Item was added:
+ ----- Method: Float>>storeOn:base: (in category 'printing') -----
+ storeOn: aStream base: base
+ "Defined here to handle special cases of NaN Infinity and negative zero"
+
+ | abs |
+ self isNaN ifTrue: [aStream nextPutAll: 'NaN'. ^ self]. "check for NaN before sign"
+ abs := self sign = -1 "Test sign rather than > 0 for special case of negative zero"
+ ifTrue:
+ [aStream nextPutAll: '-'.
+ self negated]
+ ifFalse: [self].
+ abs isInfinite ifTrue: [aStream nextPutAll: 'Infinity'. ^ self].
+ aStream print: base; nextPut: $r.
+ self = 0.0
+ ifTrue: [aStream nextPutAll: '0.0'. ^ self]
+ ifFalse: [abs absPrintOn: aStream base: base]!