diff options
author | Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com> | 2015-01-28 18:27:20 +0300 |
---|---|---|
committer | Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com> | 2015-02-06 14:40:43 +0300 |
commit | e7573f9111f6b85c599ec225714d76e08ec8a4dc (patch) | |
tree | 31553bf2c374362c62d2c10ed4c404e9db7302e8 /lib/assert.js | |
parent | 8d1179952aefaa0086ff5540671cfd6ff612594b (diff) | |
download | nodejs-e7573f9111f6b85c599ec225714d76e08ec8a4dc.tar.gz nodejs-e7573f9111f6b85c599ec225714d76e08ec8a4dc.tar.bz2 nodejs-e7573f9111f6b85c599ec225714d76e08ec8a4dc.zip |
assert: don't compare object `prototype` property
All own enumerable properties are compared already. Comparing
`prototype` property specifically can cause weird behaviour.
PR-URL: https://github.com/iojs/io.js/pull/636
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/assert.js')
-rw-r--r-- | lib/assert.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/assert.js b/lib/assert.js index 5cd75b220..e3a14bde3 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -186,8 +186,6 @@ function isArguments(object) { function objEquiv(a, b) { if (a === null || a === undefined || b === null || b === undefined) return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; // if one is a primitive, the other must be same if (util.isPrimitive(a) || util.isPrimitive(b)) return a === b; |