Browse Source

Merge pull request #739 from herby/deprecate-contains

deprecated Collection >> contains:
Nicolas Petton 10 years ago
parent
commit
c2ca0b528b
3 changed files with 8 additions and 2 deletions
  1. 3 0
      API-CHANGES.txt
  2. 3 2
      js/Kernel-Collections.js
  3. 2 0
      st/Kernel-Collections.st

+ 3 - 0
API-CHANGES.txt

@@ -1,5 +1,8 @@
 0.12.2:
 
+* Collection >> contains: is deprecated in favor of anySatisfy:
+
+
 + Announcer
   + >>on:doOnce:
 + String

+ 3 - 2
js/Kernel-Collections.js

@@ -401,12 +401,13 @@ fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
+self._deprecatedAPI();
 $1=self._anySatisfy_(aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"contains:",{aBlock:aBlock},smalltalk.Collection)})},
 args: ["aBlock"],
-source: "contains: aBlock\x0a\x09^ self anySatisfy: aBlock",
-messageSends: ["anySatisfy:"],
+source: "contains: aBlock\x0a\x09self deprecatedAPI.\x0a\x0a\x09^ self anySatisfy: aBlock",
+messageSends: ["deprecatedAPI", "anySatisfy:"],
 referencedClasses: []
 }),
 smalltalk.Collection);

+ 2 - 0
st/Kernel-Collections.st

@@ -265,6 +265,8 @@ putOn: aStream
 !Collection methodsFor: 'testing'!
 
 contains: aBlock
+	self deprecatedAPI.
+
 	^ self anySatisfy: aBlock
 !