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-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..572bc2ce --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseBeginsWith..st @@ -0,0 +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 new file mode 100644 index 00000000..efbbc0d0 --- /dev/null +++ b/repository/Grease-Pharo100-Core.package/SequenceableCollection.extension/instance/greaseEndsWith..st @@ -0,0 +1,5 @@ +*Grease-Pharo100-Core +greaseEndsWith: aSequenceableCollection + + aSequenceableCollection isEmpty ifTrue: [ ^ true ]. + ^ self endsWith: aSequenceableCollection \ No newline at end of file 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 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/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-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 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-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 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/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 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 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 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