[squeak-dev] The Inbox: Kernel-wiz.590.mcz

commits at source.squeak.org commits at source.squeak.org
Tue May 24 00:28:53 UTC 2011


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-wiz.590.mcz

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

Name: Kernel-wiz.590
Author: wiz
Time: 23 May 2011, 8:36:40.385 pm
UUID: 4c655b5c-5794-4e0b-8160-f696e5ce7fd6
Ancestors: Kernel-nice.589

Add asNonFraction to Fraction Number and Object. 

Added to object so nil will understand.
Methods are essential for fixing copyBit bug see M7635.

=============== Diff against Kernel-nice.589 ===============

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 !

Item was added:
+ ----- Method: Object>>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. Lazy initialization requires this work of nil also."
+ 
+ 	^self !




More information about the Squeak-dev mailing list