[squeak-dev] The Inbox: Kernel-ul.518.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Nov 23 13:00:32 UTC 2010


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

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

Name: Kernel-ul.518
Author: ul
Time: 23 November 2010, 1:54:49.317 pm
UUID: b098496d-94bb-f943-9cf9-bd07ab3b0b71
Ancestors: Kernel-dtl.517

- introduced Object >> #shouldBePrintedAsLiteral as a replacement for #isLiteral during printing and storing

=============== Diff against Kernel-dtl.517 ===============

Item was added:
+ ----- Method: Object>>shouldBePrintedAsLiteral (in category 'testing') -----
+ shouldBePrintedAsLiteral
+ 
+ 	^self isLiteral!

Item was changed:
  ----- Method: ScaledDecimal>>storeOn: (in category 'printing') -----
  storeOn: aStream 
  	"SxaledDecimal sometimes have more digits than they print (potentially an infinity).
  	In this case, do not use printOn: because it would loose some extra digits"
  	
+ 	self shouldBePrintedAsLiteral
- 	self isLiteral
  		ifTrue: [self printOn: aStream]
  		ifFalse: [aStream
  			nextPut: $(;
  		 	store: fraction numerator;
  			nextPut: $/;
  			store: fraction denominator;
  			nextPut: $s;
  			store: scale;
  			nextPut: $)]!




More information about the Squeak-dev mailing list