Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.351.mcz
==================== Summary ====================
Name: CollectionsTests-nice.351
Author: nice
Time: 3 March 2021, 2:18:59.33262 am
UUID: b5730ca8-f82f-3c44-af32-6b067a27d017
Ancestors: CollectionsTests-dtl.350
Change the expectations w.r.t. Interval fuzzy inclusion.
Include a couple of tests taken from https://github.com/dolphinsmalltalk/Dolphin/issues/1108
Revise the expectedFailures, some turned into unexpected success!
=============== Diff against CollectionsTests-dtl.350 ===============
Item was changed:
----- Method: IntervalTest>>expectedFailures (in category 'failures') -----
expectedFailures
+ ^ #(testIntervalOfFloatEqual)!
- ^ #(testIntervalOfFloatLast testIntervalOfFloatReversed testSurprisingFuzzyInclusionBehavior)!
Item was added:
+ ----- Method: IntervalTest>>testElementOutOfBound (in category 'tests') -----
+ testElementOutOfBound
+ self deny: ((1/5 to: 1.2 by: 1) anySatisfy: [:e | e > 1.2]).!
Item was added:
+ ----- Method: IntervalTest>>testIncludesBound (in category 'tests') -----
+ testIncludesBound
+ "This interval is crafted for including 1.2
+ but a careless definition of size might exclude this bound"
+ self assert: (((0.3 to: 1.2 by: 0.1) includes: 1.2) ==> [(0.3 to: 1.2 by: 0.1) anySatisfy: [:each | each = 1.2]]).!
Item was changed:
----- Method: IntervalTest>>testInclusionBug6455 (in category 'tests') -----
testInclusionBug6455
+ "This test is about mantis bug http://bugs.squeak.org/view.php?id=6455.
+ Well it's not a bug, and not a good feature.
+ See testSurprisingFuzzyInclusion for why this feature is not a good idea"
- "This test is about mantis bug http://bugs.squeak.org/view.php?id=6455
- It should work as long as Fuzzy inclusion test feature for Interval of Float is maintained.
- This is a case when tested element is near ones of actual value, but by default.
- Code used to work only in the case of close numbers by excess..."
+ self deny: ((0.2 to: 0.6 by: 0.1) includes: 0.3) description: 'Strict Float equality expecation is too high'.
+ self assert: ((0.2 to: 0.6 by: 0.1) includes: 0.3 successor) description: 'it includes a slightly different number'!
- self assert: ((0 to: Float pi by: Float pi / 100) includes: Float pi * (3/100))!
Item was changed:
----- Method: IntervalTest>>testIndexOfBug6455 (in category 'tests') -----
testIndexOfBug6455
"This test is about mantis bug http://bugs.squeak.org/view.php?id=6455
+ Well it's not a bug, and not a good feature.
+ See testSurprisingFuzzyInclusion for why this feature is not a good idea"
- It should work as long as Fuzzy inclusion test feature for Interval of Float is maintained.
- This is a case when tested element is near ones of actual value, but by default.
- Code used to work only in the case of close numbers by excess..."
+ self deny: ((0.2 to: 0.6 by: 0.1) indexOf: 0.3) = 2 description: 'Strict Float equality expecation is too high'.
+ self assert: ((0.2 to: 0.6 by: 0.1) indexOf: 0.3 successor) = 2 description: 'it includes a slightly different number'!
- self assert: ((0 to: Float pi by: Float pi / 100) indexOf: Float pi * (3/100)) = 4!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1376.mcz
==================== Summary ====================
Name: Kernel-nice.1376
Author: nice
Time: 3 March 2021, 12:18:22.91462 am
UUID: c9ee47c3-4e2a-fa4f-9dcd-ed61ababdb73
Ancestors: Kernel-jar.1375
Introduce hasLimitedPrecision which is the way to indicate that arithmetic may be inexact.
=============== Diff against Kernel-jar.1375 ===============
Item was added:
+ ----- Method: Float>>hasLimitedPrecision (in category 'testing') -----
+ hasLimitedPrecision
+ ^true!
Item was added:
+ ----- Method: Number>>hasLimitedPrecision (in category 'testing') -----
+ hasLimitedPrecision
+ "indicate whether this number has limited precision.
+ Arithmetic involving numbers with limited precision is potentially inexact.
+ The default implementation is false.
+ Subclass subject to inexact arithmetic shall refine."
+ ^false!
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.430.mcz
==================== Summary ====================
Name: EToys-mt.430
Author: mt
Time: 2 March 2021, 5:08:34.225687 pm
UUID: 001ccf96-161a-6848-a231-743877f0d41d
Ancestors: EToys-mt.429
Complements Morphic-mt.1732.
I think that the call in #mouseDown: is enough to stop recording. Yet, we might want to inform a morph when a halo was (or is about to be) openend on it. There is none yet.
=============== Diff against EToys-mt.429 ===============
Item was removed:
- ----- Method: EventRecordingSpace>>invokeHaloOrMove: (in category 'events-processing') -----
- invokeHaloOrMove: anEvent
-
- (eventRecorder userStopReplayMaybe: anEvent) ifTrue: [^ self stopPlayback].
- super invokeHaloOrMove: anEvent.
- !
Christoph Thiede uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.925.mcz
==================== Summary ====================
Name: Collections-ct.925
Author: ct
Time: 2 March 2021, 5:03:16.49317 pm
UUID: 5f3ec2e0-cb35-a74d-9a02-1ef8f9f78aeb
Ancestors: Collections-jar.924
Refines String>>#asPluralBasedOn: to avoid ugly spellings such as 'classs'.
This approach does not scale very far, of course, but it's better than nothing. Maybe we also want to move this into System-Localization at some other day and build language-specific plurals. :-)
=============== Diff against Collections-jar.924 ===============
Item was changed:
----- Method: String>>asPluralBasedOn: (in category 'converting') -----
asPluralBasedOn: aNumberOrCollection
"Append an 's' to this string based on whether aNumberOrCollection is 1 or of size 1."
+ aNumberOrCollection = 1
+ ifTrue: [^ self].
+ (aNumberOrCollection isCollection and: [aNumberOrCollection size = 1])
+ ifTrue: [^ self].
+
+ ^ (self endsWith: 's')
+ ifTrue: [self , 'es']
+ ifFalse: [self , 's']
- ^ (aNumberOrCollection = 1 or:
- [aNumberOrCollection isCollection and: [aNumberOrCollection size = 1]])
- ifTrue: [self]
- ifFalse: [self, 's']
!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1371.mcz
==================== Summary ====================
Name: Kernel-mt.1371
Author: mt
Time: 17 February 2021, 5:56:29.152426 pm
UUID: 1e5b05c3-feb7-e945-a253-3218ee358e74
Ancestors: Kernel-mt.1370
Extracts better examples for #valueWithExit from squeak-dev mailing list.
=============== Diff against Kernel-mt.1370 ===============
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]."
- "Provides an exit block to the receiver. Use it to break out of the control flow with an early return. For example:
- [:exit | 1 to: 10 do: [:each | each > 5 ifTrue: [exit value]]] valueWithExit"
self value: [ ^nil ]!
Christoph Thiede uploaded a new version of Protocols to project The Inbox:
http://source.squeak.org/inbox/Protocols-ct.78.mcz
==================== Summary ====================
Name: Protocols-ct.78
Author: ct
Time: 2 March 2021, 3:45:36.46717 pm
UUID: 0213a785-c806-e344-83fb-4876ec5be7ee
Ancestors: Protocols-mt.77
Refactors removal of selectors. Complements System-ct.1221.
=============== Diff against Protocols-mt.77 ===============
Item was changed:
----- Method: Lexicon>>removeMessage (in category 'menu commands') -----
removeMessage
- "Remove the selected message from the system."
+ super removeMessage ifFalse: [^ false].
+
- messageListIndex = 0 ifTrue: [^ self].
- self okToChange ifFalse: [^ self].
-
- super removeMessage.
"my #reformulateList method, called from the super #removeMethod method, will however try to preserve the selection, so we take pains to clobber it by the below..."
messageListIndex := 0.
self changed: #messageList.
self changed: #messageListIndex.
contents := nil.
self contentsChanged!