diff --git a/lib/assert.js b/lib/assert.js index 5cd75b220a2448..e3a14bde392386 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; diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 044dfbaca50112..9109fa8ff44a9e 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -130,7 +130,7 @@ assert.doesNotThrow(makeBlock(a.deepEqual, nb1, nb2)); nameBuilder2.prototype = Object; nb2 = new nameBuilder2('Ryan', 'Dahl'); -assert.throws(makeBlock(a.deepEqual, nb1, nb2), a.AssertionError); +assert.doesNotThrow(makeBlock(a.deepEqual, nb1, nb2)); // primitives and object assert.throws(makeBlock(a.deepEqual, null, {}), a.AssertionError);