Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1352.mcz==================== Summary ====================
Name: Kernel-mt.1352
Author: mt
Time: 14 October 2020, 1:58:43.251569 pm
UUID: 72187ee9-c851-894c-b496-d910ac5c5865
Ancestors: Kernel-eem.1351
Rename #doWithIndex: to #withIndexDo:. See
http://forum.world.st/The-Inbox-60Deprecated-ct-80-mcz-td5120706.html=============== Diff against Kernel-eem.1351 ===============
Item was changed:
----- Method: ClassDescription>>forceNewFrom: (in category 'instance variables') -----
forceNewFrom: anArray
"Create a new instance of the class and fill
its instance variables up with the array."
| object max |
object := self new.
max := self instSize.
+ anArray withIndexDo: [:each :index |
- anArray doWithIndex: [:each :index |
index > max ifFalse:
[object instVarAt: index put: each]].
^ object!
Item was changed:
----- Method: Object>>copySameFrom: (in category 'copying') -----
copySameFrom: otherObject
"Copy to myself all instance variables named the same in otherObject.
This ignores otherObject's control over its own inst vars."
| myInstVars otherInstVars |
myInstVars := self class allInstVarNames.
otherInstVars := otherObject class allInstVarNames.
+ myInstVars withIndexDo: [:each :index |
- myInstVars doWithIndex: [:each :index |
| match |
(match := otherInstVars indexOf: each) > 0 ifTrue:
[self instVarAt: index put: (otherObject instVarAt: match)]].
1 to: (self basicSize min: otherObject basicSize) do: [:i |
self basicAt: i put: (otherObject basicAt: i)].
!
Item was changed:
----- Method: Object>>longPrintOn: (in category 'printing') -----
longPrintOn: aStream
"Append to the argument, aStream, the names and values of all
of the receiver's instance variables."
+ self class allInstVarNames withIndexDo:
- self class allInstVarNames doWithIndex:
[:title :index |
aStream nextPutAll: title;
nextPut: $:;
space;
tab;
print: (self instVarAt: index);
cr]!
Item was changed:
----- Method: Object>>longPrintOn:limitedTo:indent: (in category 'printing') -----
longPrintOn: aStream limitedTo: sizeLimit indent: indent
"Append to the argument, aStream, the names and values of all of the receiver's instance variables. Limit is the length limit for each inst var."
+ self class allInstVarNames withIndexDo:
- self class allInstVarNames doWithIndex:
[:title :index |
indent timesRepeat: [aStream tab].
aStream nextPutAll: title;
nextPut: $:;
space;
tab;
nextPutAll:
((self instVarAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1));
cr]!