The Trunk: Kernel-eem.1372.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1372.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1372.mcz

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

Name: Kernel-eem.1372
Author: eem
Time: 17 February 2021, 9:43:25.718097 am
UUID: 925aae94-6b62-4770-b21d-499dd106ba6d
Ancestors: Kernel-mt.1371

BlockClosure>>valueWithExit really should return the value of the block if exit is not taken.

=============== Diff against Kernel-mt.1371 ===============

Item was changed:
  ----- Method: BlockClosure>>valueWithExit (in category 'evaluating') -----
  valueWithExit
  "Provides an exit block to the receiver. Use it to break out of the control flow with an early return. Examples below.
  [:break | 1 to: 10 do: [:each | each > 5 ifTrue: [break value]]] valueWithExit.
  1 to: 10 do: [:each | [:continue | each > 5 ifTrue: [continue value]] valueWithExit]."
+ ^self value: [ ^nil ]!
-  self value: [ ^nil ]!