[squeak-dev] The Trunk: Kernel-wiz.591.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 6 10:52:17 UTC 2011


Bert Freudenberg uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-wiz.591.mcz

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

Name: Kernel-wiz.591
Author: wiz
Time: 29 May 2011, 4:11:53.048 pm
UUID: 53586ad8-595c-477a-ac55-19471c286e26
Ancestors: Kernel-eem.590

This is asNonFraction defined only for Number and Fraction but not Object. Fractions are converted to Floats other numbers are left alone. Non numbers including nil  will raise a DNU.

=============== Diff against Kernel-eem.590 ===============

Item was added:
+ ----- Method: Fraction>>asNonFraction (in category 'converting') -----
+ asNonFraction	
+ 	"Answer the receiver asFloat. This is here for the benifit of the copyBits primitive which can handle floats but not fractions. It has to be stated this way so we don't turn integers into floats.  See inheritance for backstop"
+ 
+ 	^self asFloat!

Item was added:
+ ----- Method: Number>>asNonFraction (in category 'converting') -----
+ asNonFraction	
+ 	"Answer the receiver. This is here for the benifit of the copyBits primitive which can handle floats but not fractions. It has to be stated this way so we don't turn integers into floats.  See Fraction for active method"
+ 
+ 	^self !




More information about the Squeak-dev mailing list