[Pkg] The Trunk: Kernel-nice.797.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jul 28 14:50:01 UTC 2013

Nicolas Cellier uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-nice.797
Author: nice
Time: 28 July 2013, 4:48:53.354 pm
UUID: c2ee61a3-86aa-4a39-ae2a-93ac3e8c81c6
Ancestors: Kernel-fbs.796

Workaround to fix http://bugs.squeak.org/view.php?id=1554
A class variable defined in a superclass should take precedence over a global variable.

Note that current implementation will import the bindings of every superclass environment which is questionable.

Fix a doubled statement terminator in Month class>>readFrom:.

=============== Diff against Kernel-fbs.796 ===============

Item was changed:
  ----- Method: Class>>bindingOf:environment: (in category 'compiling') -----
  bindingOf: varName environment: anEnvironment
  	"Answer the binding of some variable resolved in the scope of the receiver"
  	| aSymbol binding |
  	aSymbol := varName asSymbol.
  	"First look in classVar dictionary."
+ 	(self classThatDefinesClassVariable: aSymbol) ifNotNil:
+ 		[:x | ^x classPool bindingOf: aSymbol].
- 	binding := self classPool bindingOf: aSymbol.
- 	binding ifNotNil:[^binding].
  	"Next look in shared pools."
  	self sharedPools do:[:pool | 
  		binding := pool bindingOf: aSymbol.
  		binding ifNotNil:[^binding].
  	"Next look in declared environment."
  	binding := anEnvironment bindingOf: aSymbol.
  	binding ifNotNil:[^binding].
  	"Finally look higher up the superclass chain and fail at the end."
  	superclass == nil
  		ifTrue: [^ nil]
  		ifFalse: [^ superclass bindingOf: aSymbol].

Item was changed:
  ----- Method: Month class>>readFrom: (in category 'squeak protocol') -----
  readFrom: aStream
  	| m y |
  	aStream skipSeparators.
+ 	m := aStream upToAnyOf: CharacterSet separators.
- 	m := aStream upToAnyOf: CharacterSet separators..
  	aStream skipSeparators.
  	y := aStream upToEnd.
  	^ self 
  		month: m
  		year: y asInteger
  "Month readFrom: 'July 1998' readStream"!

More information about the Packages mailing list