Fix BC in Hash.toJSON().
authorJan Schneider <jan@horde.org>
Wed, 30 Jun 2010 15:59:50 +0000 (17:59 +0200)
committerJan Schneider <jan@horde.org>
Wed, 30 Jun 2010 15:59:50 +0000 (17:59 +0200)
horde/js/prototype.js

index 1f66e01..fb0549d 100644 (file)
@@ -1304,6 +1304,10 @@ var Hash = Class.create(Enumerable, (function() {
     return new Hash(this);
   }
 
+  function toJSON() {
+    return Object.toJSON(this._object);
+  }
+
   return {
     initialize:             initialize,
     _each:                  _each,
@@ -1319,7 +1323,7 @@ var Hash = Class.create(Enumerable, (function() {
     update:                 update,
     toQueryString:          toQueryString,
     inspect:                inspect,
-    toJSON:                 toObject,
+    toJSON:                 toJSON,
     clone:                  clone
   };
 })());