Skip to content

Commit

Permalink
Merge pull request #11809 from martndemus/remove-deprecated-map-remove
Browse files Browse the repository at this point in the history
[CLEANUP beta] Remove deprecated Map#remove
  • Loading branch information
rwjblue committed Jul 18, 2015
2 parents 8560990 + 5a45a13 commit 757fcb9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
30 changes: 0 additions & 30 deletions packages/ember-metal/lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,6 @@ OrderedSet.prototype = {
return this;
},

/**
@deprecated
@method remove
@param obj
@param _guid (optional and for internal use only)
@return {Boolean}
@private
*/
remove(obj, _guid) {
Ember.deprecate('Calling `OrderedSet.prototype.remove` has been deprecated, please use `OrderedSet.prototype.delete` instead.', this._silenceRemoveDeprecation);

return this.delete(obj, _guid);
},

/**
@since 1.8.0
@method delete
Expand Down Expand Up @@ -341,21 +326,6 @@ Map.prototype = {
return this;
},

/**
@deprecated see delete
Removes a value from the map for an associated key.
@method remove
@param {*} key
@return {Boolean} true if an item was removed, false otherwise
@private
*/
remove(key) {
Ember.deprecate('Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.');

return this.delete(key);
},

/**
Removes a value from the map for an associated key.
Expand Down
17 changes: 0 additions & 17 deletions packages/ember-metal/tests/map_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,6 @@ function testMap(nameAndFunc) {
equal(map.forEach.length, 1, 'expected arity for map.forEach is 1');
});

QUnit.test('remove', function() {
map.set(object, 'winning');
map.set(number, 'winning');
map.set(string, 'winning');

expectDeprecation(function() {
map.remove(object);
map.remove(number);
map.remove(string);

// doesn't explode
map.remove({});
}, 'Calling `Map.prototype.remove` has been deprecated, please use `Map.prototype.delete` instead.');

mapHasEntries([]);
});

QUnit.test('has empty collection', function() {
equal(map.has('foo'), false);
equal(map.has(), false);
Expand Down

0 comments on commit 757fcb9

Please sign in to comment.