{"action":"created","issue":{"url":"https://api.github.com/repos/cesanta/v7/issues/513","labels_url":"https://api.github.com/repos/cesanta/v7/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/cesanta/v7/issues/513/comments","events_url":"https://api.github.com/repos/cesanta/v7/issues/513/events","html_url":"https://github.com/cesanta/v7/pull/513","id":112812731,"number":513,"title":"Fixed String.prototype.lastIndexOf()","user":{"login":"dimonomid","id":1329932,"avatar_url":"https://avatars.githubusercontent.com/u/1329932?v=3","gravatar_id":"","url":"https://api.github.com/users/dimonomid","html_url":"https://github.com/dimonomid","followers_url":"https://api.github.com/users/dimonomid/followers","following_url":"https://api.github.com/users/dimonomid/following{/other_user}","gists_url":"https://api.github.com/users/dimonomid/gists{/gist_id}","starred_url":"https://api.github.com/users/dimonomid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimonomid/subscriptions","organizations_url":"https://api.github.com/users/dimonomid/orgs","repos_url":"https://api.github.com/users/dimonomid/repos","events_url":"https://api.github.com/users/dimonomid/events{/privacy}","received_events_url":"https://api.github.com/users/dimonomid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T14:16:30Z","updated_at":"2015-10-23T08:39:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cesanta/v7/pulls/513","html_url":"https://github.com/cesanta/v7/pull/513","diff_url":"https://github.com/cesanta/v7/pull/513.diff","patch_url":"https://github.com/cesanta/v7/pull/513.patch"},"body":"At least, the following is fixed:\r\n\r\n- `lastIndexOf()` always returned `-1` if `fromIndex` isn't provided\r\n- if `fromIndex` is more than or equal to the string length, then `-1` was always returned, but we should search the whole string instead\r\n- `'123456'.lastIndexOf('3456', 2)` returned `-1`, but it should return `2`\r\n\r\nAdded all appropriate unit tests as well.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/cesanta/v7/513)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cesanta/v7/issues/comments/150513267","html_url":"https://github.com/cesanta/v7/pull/513#issuecomment-150513267","issue_url":"https://api.github.com/repos/cesanta/v7/issues/513","id":150513267,"user":{"login":"mmikulicic","id":52673,"avatar_url":"https://avatars.githubusercontent.com/u/52673?v=3","gravatar_id":"","url":"https://api.github.com/users/mmikulicic","html_url":"https://github.com/mmikulicic","followers_url":"https://api.github.com/users/mmikulicic/followers","following_url":"https://api.github.com/users/mmikulicic/following{/other_user}","gists_url":"https://api.github.com/users/mmikulicic/gists{/gist_id}","starred_url":"https://api.github.com/users/mmikulicic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmikulicic/subscriptions","organizations_url":"https://api.github.com/users/mmikulicic/orgs","repos_url":"https://api.github.com/users/mmikulicic/repos","events_url":"https://api.github.com/users/mmikulicic/events{/privacy}","received_events_url":"https://api.github.com/users/mmikulicic/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T08:39:42Z","updated_at":"2015-10-23T08:39:42Z","body":"LGTM\n<!-- Reviewable comment -K1IqaqBzPmFj-0s5pZp:676834233 -->\n\n---\n\nReviewed 2 of 2 files at r1.\nReview status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.\n\n---\n\n\n\nComments from the [review on Reviewable.io](https://reviewable.io:443/reviews/cesanta/v7/513)\n<!-- Sent from Reviewable.io -->\n"}}