Skip to content

Commit

Permalink
actually check function equality, all tests now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 3, 2011
1 parent fc23e4f commit cb7c1b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Traverse.prototype.deepEqual = function (obj) {
// both regexps on account of the __proto__ check
if (x.toString() != y.toString()) notEqual();
}
else if (x !== y) notEqual();
}
else if (typeof x === 'object') {
if (x === null || y === null) {
Expand Down
2 changes: 1 addition & 1 deletion test/equal.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.deepInstances = function () {
));

var f = function (x) { return x * 2 };
assert.ok(!traverse.deepEqual(
assert.ok(traverse.deepEqual(
[ f ], [ f ],
'these functions are actually equal'
));
Expand Down

0 comments on commit cb7c1b0

Please sign in to comment.