Status: New Owner: ---- New issue 351 by John.David.Dalton: String#lastIndexOf should return 0 for negative position values. http://code.google.com/p/v8/issues/detail?id=351
On your unit tests: http://code.google.com/p/v8/source/browse/trunk/test/mjsunit/string- lastindexof.js?spec=svn267&r=267#34 I noticed: var s = "test test test"; .... assertEquals(-1, s.lastIndexOf("test", -1)); This is incorrect. ECMA-5 doesn't mention returning -1 for negative positions in fact it says: "7. Let start min(max(pos, 0), len)." I tested this on Safari 3.4 and FF 3.05 and they return 0. You can see this is set in the max(pos, 0). -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
