diff --git a/CHANGELOG b/CHANGELOG index 5215f29..ffc83c3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* deprecation extension: mark Hash.toJSON() as removed. [Tobie Langel] + * deprecation extension: mark Class.create() used without arguments as deprecated. [Tobie Langel] * deprecation extension: mark Event.unloadCache as removed rather than deprecated. [Tobie Langel] diff --git a/ext/deprecation/deprecation.js b/ext/deprecation/deprecation.js index 551962c..2db80e1 100644 --- a/ext/deprecation/deprecation.js +++ b/ext/deprecation/deprecation.js @@ -276,6 +276,14 @@ DeprecationNotifier.init([ 'Use the instance method Hash#toQueryString or Object.toQueryString instead.' }, + { + methodName: 'toJSON', + namespace: Hash, + message: 'Hash.toJSON has been removed.\n' + + 'Use the instance method Hash#toJSON or Object.toJSON instead.', + type: 'removal' + }, + { methodName: 'remove', namespace: Hash.prototype, diff --git a/ext/deprecation/deprecation_test.html b/ext/deprecation/deprecation_test.html index 1079dd9..470573a 100644 --- a/ext/deprecation/deprecation_test.html +++ b/ext/deprecation/deprecation_test.html @@ -219,6 +219,10 @@ Hash.toQueryString({}); assertDeprecationNotified('Hash.toQueryString has been deprecated.\n' + 'Use the instance method Hash#toQueryString or Object.toQueryString instead.'); + + Hash.toJSON({}); + assertRemovalNotified('Hash.toJSON has been removed.\n' + + 'Use the instance method Hash#toJSON or Object.toJSON instead.'); var h = $H({ foo: 2 });