{"action":"created","comment":{"url":"https://api.github.com/repos/elm-lang/core/pulls/comments/71214390","id":71214390,"diff_hunk":"@@ -192,11 +192,16 @@ function indexes(sub, str)\n \tvar subLen = sub.length;\n \tvar i = 0;\n \tvar is = [];\n-\twhile ((i = str.indexOf(sub, i)) > -1)\n+\t\n+\tif (subLen > 0)\n \t{\n-\t\tis.push(i);\n-\t\ti = i + subLen;\n+\t\twhile ((i = str.indexOf(sub, i)) > -1)\n+\t\t{\n+\t\t\tis.push(i);\n+\t\t\ti = i + subLen;\n+\t\t}\t\n \t}\n+\t","path":"src/Native/String.js","position":16,"original_position":16,"commit_id":"0d23dee56765ec03c8906a553f3ac28e7bd3e582","original_commit_id":"0d23dee56765ec03c8906a553f3ac28e7bd3e582","user":{"login":"eeue56","id":1139198,"avatar_url":"https://avatars.githubusercontent.com/u/1139198?v=3","gravatar_id":"","url":"https://api.github.com/users/eeue56","html_url":"https://github.com/eeue56","followers_url":"https://api.github.com/users/eeue56/followers","following_url":"https://api.github.com/users/eeue56/following{/other_user}","gists_url":"https://api.github.com/users/eeue56/gists{/gist_id}","starred_url":"https://api.github.com/users/eeue56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeue56/subscriptions","organizations_url":"https://api.github.com/users/eeue56/orgs","repos_url":"https://api.github.com/users/eeue56/repos","events_url":"https://api.github.com/users/eeue56/events{/privacy}","received_events_url":"https://api.github.com/users/eeue56/received_events","type":"User","site_admin":false},"body":"(typo: should be `subLen < 1`)","created_at":"2016-07-18T19:39:14Z","updated_at":"2016-07-18T19:39:14Z","html_url":"https://github.com/elm-lang/core/pull/646#discussion_r71214390","pull_request_url":"https://api.github.com/repos/elm-lang/core/pulls/646","_links":{"self":{"href":"https://api.github.com/repos/elm-lang/core/pulls/comments/71214390"},"html":{"href":"https://github.com/elm-lang/core/pull/646#discussion_r71214390"},"pull_request":{"href":"https://api.github.com/repos/elm-lang/core/pulls/646"}}},"pull_request":{"url":"https://api.github.com/repos/elm-lang/core/pulls/646","id":73567166,"html_url":"https://github.com/elm-lang/core/pull/646","diff_url":"https://github.com/elm-lang/core/pull/646.diff","patch_url":"https://github.com/elm-lang/core/pull/646.patch","issue_url":"https://api.github.com/repos/elm-lang/core/issues/646","number":646,"state":"open","locked":false,"title":"Avoiding infinite loop when the search string is empty","user":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"body":"The `String.indexes` function enters an infinite loop when doing  `String.indexes \"\" \"Some string\"`, this is because the `i` variable is no advanced on each step of the loop since it will always return 0.\r\n\r\nI chose to return an empty list for this cases, as I think it is the most sensible thing to do IMO, but another valid interpretation is that the empty string is contained in all of the indexes of the string.\r\n\r\nIn case the second interpretation is preferred, I can gladly change it :)","created_at":"2016-06-13T12:28:07Z","updated_at":"2016-07-18T19:39:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2c3dc647200beb5d1bb3025b3672827de532385","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elm-lang/core/pulls/646/commits","review_comments_url":"https://api.github.com/repos/elm-lang/core/pulls/646/comments","review_comment_url":"https://api.github.com/repos/elm-lang/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elm-lang/core/issues/646/comments","statuses_url":"https://api.github.com/repos/elm-lang/core/statuses/0d23dee56765ec03c8906a553f3ac28e7bd3e582","head":{"label":"lorenzo:patch-1","ref":"patch-1","sha":"0d23dee56765ec03c8906a553f3ac28e7bd3e582","user":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"repo":{"id":52609684,"name":"core","full_name":"lorenzo/core","owner":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lorenzo/core","description":"Elm's core libraries","fork":true,"url":"https://api.github.com/repos/lorenzo/core","forks_url":"https://api.github.com/repos/lorenzo/core/forks","keys_url":"https://api.github.com/repos/lorenzo/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lorenzo/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lorenzo/core/teams","hooks_url":"https://api.github.com/repos/lorenzo/core/hooks","issue_events_url":"https://api.github.com/repos/lorenzo/core/issues/events{/number}","events_url":"https://api.github.com/repos/lorenzo/core/events","assignees_url":"https://api.github.com/repos/lorenzo/core/assignees{/user}","branches_url":"https://api.github.com/repos/lorenzo/core/branches{/branch}","tags_url":"https://api.github.com/repos/lorenzo/core/tags","blobs_url":"https://api.github.com/repos/lorenzo/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lorenzo/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lorenzo/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/lorenzo/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lorenzo/core/statuses/{sha}","languages_url":"https://api.github.com/repos/lorenzo/core/languages","stargazers_url":"https://api.github.com/repos/lorenzo/core/stargazers","contributors_url":"https://api.github.com/repos/lorenzo/core/contributors","subscribers_url":"https://api.github.com/repos/lorenzo/core/subscribers","subscription_url":"https://api.github.com/repos/lorenzo/core/subscription","commits_url":"https://api.github.com/repos/lorenzo/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/lorenzo/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/lorenzo/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/lorenzo/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/lorenzo/core/contents/{+path}","compare_url":"https://api.github.com/repos/lorenzo/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lorenzo/core/merges","archive_url":"https://api.github.com/repos/lorenzo/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lorenzo/core/downloads","issues_url":"https://api.github.com/repos/lorenzo/core/issues{/number}","pulls_url":"https://api.github.com/repos/lorenzo/core/pulls{/number}","milestones_url":"https://api.github.com/repos/lorenzo/core/milestones{/number}","notifications_url":"https://api.github.com/repos/lorenzo/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lorenzo/core/labels{/name}","releases_url":"https://api.github.com/repos/lorenzo/core/releases{/id}","deployments_url":"https://api.github.com/repos/lorenzo/core/deployments","created_at":"2016-02-26T14:27:30Z","updated_at":"2016-02-26T14:27:32Z","pushed_at":"2016-07-18T18:34:00Z","git_url":"git://github.com/lorenzo/core.git","ssh_url":"git@github.com:lorenzo/core.git","clone_url":"https://github.com/lorenzo/core.git","svn_url":"https://github.com/lorenzo/core","homepage":null,"size":1225,"stargazers_count":0,"watchers_count":0,"language":"Elm","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elm-lang:master","ref":"master","sha":"c1d0e4d19639649dafd63daf320890cfb6ef0c99","user":{"login":"elm-lang","id":4359353,"avatar_url":"https://avatars.githubusercontent.com/u/4359353?v=3","gravatar_id":"","url":"https://api.github.com/users/elm-lang","html_url":"https://github.com/elm-lang","followers_url":"https://api.github.com/users/elm-lang/followers","following_url":"https://api.github.com/users/elm-lang/following{/other_user}","gists_url":"https://api.github.com/users/elm-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elm-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elm-lang/subscriptions","organizations_url":"https://api.github.com/users/elm-lang/orgs","repos_url":"https://api.github.com/users/elm-lang/repos","events_url":"https://api.github.com/users/elm-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elm-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":25231002,"name":"core","full_name":"elm-lang/core","owner":{"login":"elm-lang","id":4359353,"avatar_url":"https://avatars.githubusercontent.com/u/4359353?v=3","gravatar_id":"","url":"https://api.github.com/users/elm-lang","html_url":"https://github.com/elm-lang","followers_url":"https://api.github.com/users/elm-lang/followers","following_url":"https://api.github.com/users/elm-lang/following{/other_user}","gists_url":"https://api.github.com/users/elm-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elm-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elm-lang/subscriptions","organizations_url":"https://api.github.com/users/elm-lang/orgs","repos_url":"https://api.github.com/users/elm-lang/repos","events_url":"https://api.github.com/users/elm-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elm-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elm-lang/core","description":"Elm's core libraries","fork":false,"url":"https://api.github.com/repos/elm-lang/core","forks_url":"https://api.github.com/repos/elm-lang/core/forks","keys_url":"https://api.github.com/repos/elm-lang/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elm-lang/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elm-lang/core/teams","hooks_url":"https://api.github.com/repos/elm-lang/core/hooks","issue_events_url":"https://api.github.com/repos/elm-lang/core/issues/events{/number}","events_url":"https://api.github.com/repos/elm-lang/core/events","assignees_url":"https://api.github.com/repos/elm-lang/core/assignees{/user}","branches_url":"https://api.github.com/repos/elm-lang/core/branches{/branch}","tags_url":"https://api.github.com/repos/elm-lang/core/tags","blobs_url":"https://api.github.com/repos/elm-lang/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elm-lang/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elm-lang/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/elm-lang/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elm-lang/core/statuses/{sha}","languages_url":"https://api.github.com/repos/elm-lang/core/languages","stargazers_url":"https://api.github.com/repos/elm-lang/core/stargazers","contributors_url":"https://api.github.com/repos/elm-lang/core/contributors","subscribers_url":"https://api.github.com/repos/elm-lang/core/subscribers","subscription_url":"https://api.github.com/repos/elm-lang/core/subscription","commits_url":"https://api.github.com/repos/elm-lang/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/elm-lang/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/elm-lang/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/elm-lang/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/elm-lang/core/contents/{+path}","compare_url":"https://api.github.com/repos/elm-lang/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elm-lang/core/merges","archive_url":"https://api.github.com/repos/elm-lang/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elm-lang/core/downloads","issues_url":"https://api.github.com/repos/elm-lang/core/issues{/number}","pulls_url":"https://api.github.com/repos/elm-lang/core/pulls{/number}","milestones_url":"https://api.github.com/repos/elm-lang/core/milestones{/number}","notifications_url":"https://api.github.com/repos/elm-lang/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elm-lang/core/labels{/name}","releases_url":"https://api.github.com/repos/elm-lang/core/releases{/id}","deployments_url":"https://api.github.com/repos/elm-lang/core/deployments","created_at":"2014-10-14T23:33:13Z","updated_at":"2016-07-18T11:18:31Z","pushed_at":"2016-07-18T19:31:02Z","git_url":"git://github.com/elm-lang/core.git","ssh_url":"git@github.com:elm-lang/core.git","clone_url":"https://github.com/elm-lang/core.git","svn_url":"https://github.com/elm-lang/core","homepage":null,"size":1535,"stargazers_count":519,"watchers_count":519,"language":"Elm","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":179,"mirror_url":null,"open_issues_count":71,"forks":179,"open_issues":71,"watchers":519,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elm-lang/core/pulls/646"},"html":{"href":"https://github.com/elm-lang/core/pull/646"},"issue":{"href":"https://api.github.com/repos/elm-lang/core/issues/646"},"comments":{"href":"https://api.github.com/repos/elm-lang/core/issues/646/comments"},"review_comments":{"href":"https://api.github.com/repos/elm-lang/core/pulls/646/comments"},"review_comment":{"href":"https://api.github.com/repos/elm-lang/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elm-lang/core/pulls/646/commits"},"statuses":{"href":"https://api.github.com/repos/elm-lang/core/statuses/0d23dee56765ec03c8906a553f3ac28e7bd3e582"}}}}
{"actor":{"display_login":"eeue56"}}