[squeak-dev] The Trunk: Kernel-nice.497.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Sep 21 08:30:39 UTC 2010
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.497.mcz
==================== Summary ====================
Name: Kernel-nice.497
Author: nice
Time: 21 September 2010, 10:30:22.684 am
UUID: bfd5c6a8-85ba-9345-a68a-ebb6bc31fefc
Ancestors: Kernel-cmm.496
Patch for http://bugs.squeak.org/view.php?id=7352 in Kernel-nice.482 broke previously possible usage of BlockClosure as actions (see #when:evaluate:).
Implement required events-support message in BlockClosure to restore this feature.
=============== Diff against Kernel-cmm.496 ===============
Item was changed:
SystemOrganization addCategory: #'Kernel-Chronology'!
SystemOrganization addCategory: #'Kernel-Classes'!
SystemOrganization addCategory: #'Kernel-Methods'!
SystemOrganization addCategory: #'Kernel-Numbers'!
SystemOrganization addCategory: #'Kernel-Objects'!
SystemOrganization addCategory: #'Kernel-Processes'!
SystemOrganization addCategory: #'Kernel-Models'!
+ SystemOrganization addCategory: #'Kernel-Tests-ClassBuilder'!
Item was added:
+ ----- Method: BlockClosure>>isReceiverOrAnyArgumentGarbage (in category 'events-support') -----
+ isReceiverOrAnyArgumentGarbage
+ "For use in the when:evaluate: protocol, i.e.,
+ foo when: #bar evaluate:[self handleBar].."
+ ^false!
Item was removed:
- ----- Method: BlockClosure>>isValid (in category 'events-support') -----
- isValid
- "For use in the when:evaluate: protocol, i.e.,
- foo when: #bar evaluate:[self handleBar].
- Return true."
- ^true!
Item was added:
+ ----- Method: BlockClosure>>valueOtherwise: (in category 'events-support') -----
+ valueOtherwise: aBlock
+ "Send the message and answer the return value"
+
+ ^self value!
Item was added:
+ ----- Method: BlockClosure>>valueWithArguments:otherwise: (in category 'events-support') -----
+ valueWithArguments: anArray otherwise: aBlock
+
+ ^ self valueWithArguments: anArray!
Item was added:
+ ----- Method: BlockClosure>>valueWithEnoughArguments: (in category 'events-support') -----
+ valueWithEnoughArguments: anArray
+ "call me with enough arguments from anArray"
+ | args |
+ (anArray size == self numArgs)
+ ifTrue: [ ^self valueWithArguments: anArray ].
+
+ args := Array new: self numArgs.
+ args replaceFrom: 1
+ to: (anArray size min: args size)
+ with: anArray
+ startingAt: 1.
+
+ ^ self valueWithArguments: args!
Item was changed:
----- Method: NumberParser>>nextIntegerBase:ifFail: (in category 'parsing-public') -----
nextIntegerBase: aRadix ifFail: aBlock
"Form an integer with optional sign and following digits from sourceStream."
| isNeg value |
isNeg := self peekSignIsMinus.
value := self nextUnsignedIntegerOrNilBase: aRadix.
+ value ifNil: [^aBlock value].
- value isNil ifTrue: [^aBlock value].
^isNeg
ifTrue: [value negated]
ifFalse: [value]!
More information about the Squeak-dev
mailing list
|