Fix bug `indexOf`. when arr is number, it was return 0 #8

merged 1 commit into from Feb 4, 2012

2 participants


Not supported Array#indexOf browser(under IE8), this test is failed.

err(function () {
}, "expected 3 to contain 'baz'");
// => Error: expected 'expected 3 to contain \'baz\'' to equal 'Expected an error'

This is indexOf bug.

indexOf(0, 'baz'); //=> 0

It fixed.

@rauchg rauchg merged commit 3b010b9 into Automattic:master Feb 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment