From 09c5d67d5cff0085915dc305e43e1e72a16ee18c Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 12:01:18 +0100 Subject: [PATCH 1/8] deprecate `beginsWithSubCollection:` and `endsWithSubCollection:` in favor of the new `greaseBeginsWith:` and `greaseEndsWith:` --- .../instance/beginsWithSubCollection..st | 4 ++++ .../instance/endsWithSubCollection..st | 4 ++++ .../instance/greaseBeginsWith..st | 4 ++++ .../instance/greaseEndsWith..st | 4 ++++ .../instance/initialize.st | 4 ++-- .../instance/testGreaseBeginsWith.st | 9 +++++++++ .../instance/testGreaseEndsWith.st | 9 +++++++++ 7 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st create mode 100644 repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseBeginsWith.st create mode 100644 repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseEndsWith.st diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st index 2cd270c8..738a82b7 100644 --- a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st @@ -1,4 +1,8 @@ *Grease-Pharo100-Core beginsWithSubCollection: aSequenceableCollection "Some platforms implement #beginsWith: to answer true for an empty argument." + self + greaseDeprecatedApi: 'SequenceableCollection>>#beginsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseBegins:'. + aSequenceableCollection isEmpty ifTrue: [ ^ false ]. ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st index d3b8f6eb..43af03a2 100644 --- a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st @@ -1,4 +1,8 @@ *Grease-Pharo100-Core endsWithSubCollection: aSequenceableCollection "Some platforms implement #endsWith: to answer true for an empty argument." + self + greaseDeprecatedApi: 'SequenceableCollection>>#endsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseEndsWith:'. + aSequenceableCollection isEmpty ifTrue: [ ^ false ]. ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..b2bfda6b --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,4 @@ +*Grease-Pharo100-Core +greaseBeginsWith: aSequenceableCollection + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..9778ba5f --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,4 @@ +*Grease-Pharo100-Core +greaseEndsWith: aSequenceableCollection + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo90-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st b/repository/Grease-Pharo90-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st index 643668f1..776d58af 100644 --- a/repository/Grease-Pharo90-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st +++ b/repository/Grease-Pharo90-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st @@ -3,6 +3,6 @@ initialize super initialize. self rewriteRule replace: '`@collection beginsWith: `@subCollection' - with: '`@collection beginsWithSubCollection: `@subCollection'; + with: '`@collection greaseBeginsWith: `@subCollection'; replace: '`@collection endsWith: `@subCollection' - with: '`@collection endsWithSubCollection: `@subCollection' \ No newline at end of file + with: '`@collection greaseEndsWith: `@subCollection' \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseBeginsWith.st b/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseBeginsWith.st new file mode 100644 index 00000000..69cd8b12 --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseBeginsWith.st @@ -0,0 +1,9 @@ +tests +testGreaseBeginsWith + | collection | + collection := self arbitraryCollection. + self assert: (collection greaseBeginsWith: (collection copyWithout: collection last)). + self assert: (collection greaseBeginsWith: collection). + self deny: (collection greaseBeginsWith: (collection copyWith: collection first)). + self assert: (collection greaseBeginsWith: self emptyCollection). + self deny: (self emptyCollection greaseBeginsWith: collection) \ No newline at end of file diff --git a/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseEndsWith.st b/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseEndsWith.st new file mode 100644 index 00000000..5bf33d8b --- /dev/null +++ b/repository/Grease-Tests-Core.package/GRAbstractSequenceableCollectionTest.class/instance/testGreaseEndsWith.st @@ -0,0 +1,9 @@ +tests +testGreaseEndsWith + | collection | + collection := self arbitraryCollection. + self assert: (collection greaseEndsWith: (collection copyWithout: collection first)). + self assert: (collection greaseEndsWith: collection). + self deny: (collection greaseEndsWith: (collection copyWith: collection first)). + self assert: (collection greaseEndsWith: self emptyCollection). + self deny: (self emptyCollection greaseEndsWith: collection) \ No newline at end of file From 5a570b874d0dfcb334cfe4cc8792ec1c39236df4 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 12:09:49 +0100 Subject: [PATCH 2/8] Fix testNotPortableCollectionsRule --- .../instance/testNotPortableCollectionsRule.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st index 473591ef..a0977f60 100644 --- a/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st +++ b/repository/Grease-Tests-Slime.package/GRSlimeTest.class/instance/testNotPortableCollectionsRule.st @@ -9,5 +9,5 @@ testNotPortableCollectionsRule self runTransformation: GRNotPortableCollectionsRule changes: #( - 'beginsWith1 ''abc'' beginsWithSubCollection: ''a''' - 'endsWith1 ''abc'' endsWithSubCollection: ''a''') \ No newline at end of file + 'beginsWith1 ''abc'' greaseBeginsWith: ''a''' + 'endsWith1 ''abc'' greaseEndsWith: ''a''') \ No newline at end of file From 8ff1ded6989166bf260bb72fe9b0cd5c9e7b5d00 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 12:27:24 +0100 Subject: [PATCH 3/8] add greaseBeginsWith: and greaseEndsWith: to Pharo 7 and 9 as well --- .../instance/greaseBeginsWith..st | 5 +++++ .../instance/greaseEndsWith..st | 5 +++++ .../instance/greaseBeginsWith..st | 5 +++++ .../instance/greaseEndsWith..st | 5 +++++ .../instance/greaseBeginsWith..st | 5 +++++ .../instance/greaseEndsWith..st | 5 +++++ 6 files changed, 30 insertions(+) create mode 100644 repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st create mode 100644 repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st create mode 100644 repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st diff --git a/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..d9528b3d --- /dev/null +++ b/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,5 @@ +*grease-gemstone-core +greaseBeginsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..242c2dd4 --- /dev/null +++ b/repository/Grease-GemStone-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*grease-gemstone-core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..01880fd1 --- /dev/null +++ b/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,5 @@ +*Grease-Pharo70-Core +greaseBeginsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..a2483ea4 --- /dev/null +++ b/repository/Grease-Pharo70-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*Grease-Pharo70-Core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..ccc6dad0 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,5 @@ +*Grease-Pharo90-Core +greaseBeginsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..49a39d31 --- /dev/null +++ b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*Grease-Pharo90-Core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file From 7584246d620adaf54121b4ac108917951e1396fd Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 12:36:43 +0100 Subject: [PATCH 4/8] add greaseBeginsWith: and greaseEndsWith: to Squeak --- .../instance/greaseBeginsWith..st | 5 +++++ .../instance/greaseEndsWith..st | 5 +++++ .../instance/greaseBeginsWith..st | 5 +++++ .../instance/greaseEndsWith..st | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st create mode 100644 repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st create mode 100644 repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st diff --git a/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..f23ab6a2 --- /dev/null +++ b/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,5 @@ +*grease-squeak5-core +greaseBeginsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..a66b574e --- /dev/null +++ b/repository/Grease-Squeak5-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*grease-squeak5-core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st new file mode 100644 index 00000000..428ad0ae --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +1,5 @@ +*grease-squeak6-core +greaseBeginsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st new file mode 100644 index 00000000..f1b16048 --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*grease-squeak6-core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file From a17f25082abe761ec3e74900fd909bcb3acf426a Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 12:39:41 +0100 Subject: [PATCH 5/8] code style --- .../instance/greaseBeginsWith..st | 1 + .../SequenceableCollection.extension/instance/greaseEndsWith..st | 1 + 2 files changed, 2 insertions(+) diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st index b2bfda6b..572bc2ce 100644 --- a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -1,4 +1,5 @@ *Grease-Pharo100-Core greaseBeginsWith: aSequenceableCollection + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st index 9778ba5f..efbbc0d0 100644 --- a/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -1,4 +1,5 @@ *Grease-Pharo100-Core greaseEndsWith: aSequenceableCollection + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. ^ self endsWith: aSequenceableCollection \ No newline at end of file From 3688183c5d3325ffd9b58072f930fb171dd03f90 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 13:06:19 +0100 Subject: [PATCH 6/8] Fix slime rule in Pharo 7 and 9 --- .../GRNotPortableCollectionsRule.class/instance/initialize.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Grease-Pharo40-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st b/repository/Grease-Pharo40-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st index 643668f1..776d58af 100644 --- a/repository/Grease-Pharo40-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st +++ b/repository/Grease-Pharo40-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st @@ -3,6 +3,6 @@ initialize super initialize. self rewriteRule replace: '`@collection beginsWith: `@subCollection' - with: '`@collection beginsWithSubCollection: `@subCollection'; + with: '`@collection greaseBeginsWith: `@subCollection'; replace: '`@collection endsWith: `@subCollection' - with: '`@collection endsWithSubCollection: `@subCollection' \ No newline at end of file + with: '`@collection greaseEndsWith: `@subCollection' \ No newline at end of file From e6ba7bd409d8d0040e90e433fde73deae8cc6e88 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 13:10:40 +0100 Subject: [PATCH 7/8] adapt slime rule in Squeak as well --- .../GRNotPortableCollectionsRule.class/instance/initialize.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Grease-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st b/repository/Grease-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st index 643668f1..776d58af 100644 --- a/repository/Grease-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st +++ b/repository/Grease-Slime.package/GRNotPortableCollectionsRule.class/instance/initialize.st @@ -3,6 +3,6 @@ initialize super initialize. self rewriteRule replace: '`@collection beginsWith: `@subCollection' - with: '`@collection beginsWithSubCollection: `@subCollection'; + with: '`@collection greaseBeginsWith: `@subCollection'; replace: '`@collection endsWith: `@subCollection' - with: '`@collection endsWithSubCollection: `@subCollection' \ No newline at end of file + with: '`@collection greaseEndsWith: `@subCollection' \ No newline at end of file From 955fa54f95a08f610645a5911837f2dac42ea5ea Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 5 Feb 2023 13:28:13 +0100 Subject: [PATCH 8/8] added deprecation message in Pharo 9 and Squeak 6 --- .../instance/beginsWithSubCollection..st | 4 ++++ .../instance/endsWithSubCollection..st | 4 ++++ .../instance/beginsWithSubCollection..st | 4 ++++ .../instance/endsWithSubCollection..st | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st index 7d00507d..290ebb62 100644 --- a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st +++ b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st @@ -1,4 +1,8 @@ *Grease-Pharo90-Core beginsWithSubCollection: aSequenceableCollection + + self + greaseDeprecatedApi: 'SequenceableCollection>>#beginsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseBeginsWith:'. "Some platforms implement #beginsWith: to answer true for an empty argument." ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st index 1fe4f069..72070fe2 100644 --- a/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st +++ b/repository/Grease-Pharo90-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st @@ -1,4 +1,8 @@ *Grease-Pharo90-Core endsWithSubCollection: aSequenceableCollection + + self + greaseDeprecatedApi: 'SequenceableCollection>>#endsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseEndsWith:'. "Some platforms implement #endsWith: to answer true for an empty argument." ^ self endsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st index 372efe84..be930027 100644 --- a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st +++ b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/beginsWithSubCollection..st @@ -1,4 +1,8 @@ *grease-squeak6-core beginsWithSubCollection: aSequenceableCollection + self + greaseDeprecatedApi: 'SequenceableCollection>>#beginsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseBeginsWith:'. "Some platforms implement #beginsWith: to answer true for an empty argument." + aSequenceableCollection isEmpty ifTrue: [ ^ false ]. ^ self beginsWith: aSequenceableCollection \ No newline at end of file diff --git a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st index efd43298..7eb90e86 100644 --- a/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st +++ b/repository/Grease-Squeak6-Core.package/SequenceableCollection.extension/instance/endsWithSubCollection..st @@ -1,4 +1,8 @@ *grease-squeak6-core endsWithSubCollection: aSequenceableCollection + self + greaseDeprecatedApi: 'SequenceableCollection>>#endsWithSubCollection:' + details: 'Use SequenceableCollection>>#greaseEndsWith:'. "Some platforms implement #endsWith: to answer true for an empty argument." + aSequenceableCollection isEmpty ifTrue: [ ^ false ]. ^ self endsWith: aSequenceableCollection \ No newline at end of file