{"action":"created","comment":{"url":"https://api.github.com/repos/scala/scala/pulls/comments/36111144","id":36111144,"diff_hunk":"@@ -154,11 +154,12 @@ extends scala.collection.AbstractSeq[Int]\n \n   @inline final override def foreach[@specialized(Unit) U](f: Int => U) {\n     validateMaxLength()\n-    val isCommonCase = (start != Int.MinValue || end != Int.MinValue)\n+    val isCommonCase = start != Int.MinValue && start != Int.MaxValue && end != Int.MinValue && end != Int.MaxValue\n     var i = start\n     var count = 0\n-    val terminal = terminalElement\n     val step = this.step\n+    val terminal = lastElement + step\n+","path":"src/library/scala/collection/immutable/Range.scala","position":11,"original_position":11,"commit_id":"cc202f978e5aeac98b44a412f1404719948c9278","original_commit_id":"cc202f978e5aeac98b44a412f1404719948c9278","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"body":"This second change is not necessary anymore: `terminalElement` *is* `lastElement + step`.","created_at":"2015-08-03T17:54:13Z","updated_at":"2015-08-03T17:54:13Z","html_url":"https://github.com/scala/scala/pull/4676#discussion_r36111144","pull_request_url":"https://api.github.com/repos/scala/scala/pulls/4676","_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/comments/36111144"},"html":{"href":"https://github.com/scala/scala/pull/4676#discussion_r36111144"},"pull_request":{"href":"https://api.github.com/repos/scala/scala/pulls/4676"}}},"pull_request":{"url":"https://api.github.com/repos/scala/scala/pulls/4676","id":41389256,"html_url":"https://github.com/scala/scala/pull/4676","diff_url":"https://github.com/scala/scala/pull/4676.diff","patch_url":"https://github.com/scala/scala/pull/4676.patch","issue_url":"https://api.github.com/repos/scala/scala/issues/4676","number":4676,"state":"open","locked":false,"title":"SI-9424 and SI-9388 solutions","user":{"login":"kmruiz","id":1822138,"avatar_url":"https://avatars.githubusercontent.com/u/1822138?v=3","gravatar_id":"","url":"https://api.github.com/users/kmruiz","html_url":"https://github.com/kmruiz","followers_url":"https://api.github.com/users/kmruiz/followers","following_url":"https://api.github.com/users/kmruiz/following{/other_user}","gists_url":"https://api.github.com/users/kmruiz/gists{/gist_id}","starred_url":"https://api.github.com/users/kmruiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmruiz/subscriptions","organizations_url":"https://api.github.com/users/kmruiz/orgs","repos_url":"https://api.github.com/users/kmruiz/repos","events_url":"https://api.github.com/users/kmruiz/events{/privacy}","received_events_url":"https://api.github.com/users/kmruiz/received_events","type":"User","site_admin":false},"body":"I added code that solves the issue: https://issues.scala-lang.org/browse/SI-9424\r\n\r\nIt currently clones the current PriorityQueue and dequeue all the elements that are into it because the ordering is done while reading.\r\n\r\nMaybe it's a good idea to add more sorting responsability on writting.","created_at":"2015-07-31T23:08:46Z","updated_at":"2015-08-03T17:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"215b8f2c714c3dc748c8459bd8753c57aa24713e","assignee":null,"milestone":{"url":"https://api.github.com/repos/scala/scala/milestones/49","html_url":"https://github.com/scala/scala/milestones/2.11.8","labels_url":"https://api.github.com/repos/scala/scala/milestones/49/labels","id":1169165,"number":49,"title":"2.11.8","description":"Merge to 2.11.x.\r\n","creator":{"login":"SethTisue","id":161079,"avatar_url":"https://avatars.githubusercontent.com/u/161079?v=3","gravatar_id":"","url":"https://api.github.com/users/SethTisue","html_url":"https://github.com/SethTisue","followers_url":"https://api.github.com/users/SethTisue/followers","following_url":"https://api.github.com/users/SethTisue/following{/other_user}","gists_url":"https://api.github.com/users/SethTisue/gists{/gist_id}","starred_url":"https://api.github.com/users/SethTisue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SethTisue/subscriptions","organizations_url":"https://api.github.com/users/SethTisue/orgs","repos_url":"https://api.github.com/users/SethTisue/repos","events_url":"https://api.github.com/users/SethTisue/events{/privacy}","received_events_url":"https://api.github.com/users/SethTisue/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":50,"state":"open","created_at":"2015-06-17T19:08:28Z","updated_at":"2015-08-03T02:38:58Z","due_on":"2015-09-21T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scala/scala/pulls/4676/commits","review_comments_url":"https://api.github.com/repos/scala/scala/pulls/4676/comments","review_comment_url":"https://api.github.com/repos/scala/scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scala/scala/issues/4676/comments","statuses_url":"https://api.github.com/repos/scala/scala/statuses/cc202f978e5aeac98b44a412f1404719948c9278","head":{"label":"kmruiz:2.11.x","ref":"2.11.x","sha":"cc202f978e5aeac98b44a412f1404719948c9278","user":{"login":"kmruiz","id":1822138,"avatar_url":"https://avatars.githubusercontent.com/u/1822138?v=3","gravatar_id":"","url":"https://api.github.com/users/kmruiz","html_url":"https://github.com/kmruiz","followers_url":"https://api.github.com/users/kmruiz/followers","following_url":"https://api.github.com/users/kmruiz/following{/other_user}","gists_url":"https://api.github.com/users/kmruiz/gists{/gist_id}","starred_url":"https://api.github.com/users/kmruiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmruiz/subscriptions","organizations_url":"https://api.github.com/users/kmruiz/orgs","repos_url":"https://api.github.com/users/kmruiz/repos","events_url":"https://api.github.com/users/kmruiz/events{/privacy}","received_events_url":"https://api.github.com/users/kmruiz/received_events","type":"User","site_admin":false},"repo":{"id":40027569,"name":"scala","full_name":"kmruiz/scala","owner":{"login":"kmruiz","id":1822138,"avatar_url":"https://avatars.githubusercontent.com/u/1822138?v=3","gravatar_id":"","url":"https://api.github.com/users/kmruiz","html_url":"https://github.com/kmruiz","followers_url":"https://api.github.com/users/kmruiz/followers","following_url":"https://api.github.com/users/kmruiz/following{/other_user}","gists_url":"https://api.github.com/users/kmruiz/gists{/gist_id}","starred_url":"https://api.github.com/users/kmruiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmruiz/subscriptions","organizations_url":"https://api.github.com/users/kmruiz/orgs","repos_url":"https://api.github.com/users/kmruiz/repos","events_url":"https://api.github.com/users/kmruiz/events{/privacy}","received_events_url":"https://api.github.com/users/kmruiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kmruiz/scala","description":"The Scala programming language","fork":true,"url":"https://api.github.com/repos/kmruiz/scala","forks_url":"https://api.github.com/repos/kmruiz/scala/forks","keys_url":"https://api.github.com/repos/kmruiz/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmruiz/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmruiz/scala/teams","hooks_url":"https://api.github.com/repos/kmruiz/scala/hooks","issue_events_url":"https://api.github.com/repos/kmruiz/scala/issues/events{/number}","events_url":"https://api.github.com/repos/kmruiz/scala/events","assignees_url":"https://api.github.com/repos/kmruiz/scala/assignees{/user}","branches_url":"https://api.github.com/repos/kmruiz/scala/branches{/branch}","tags_url":"https://api.github.com/repos/kmruiz/scala/tags","blobs_url":"https://api.github.com/repos/kmruiz/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmruiz/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmruiz/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmruiz/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmruiz/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/kmruiz/scala/languages","stargazers_url":"https://api.github.com/repos/kmruiz/scala/stargazers","contributors_url":"https://api.github.com/repos/kmruiz/scala/contributors","subscribers_url":"https://api.github.com/repos/kmruiz/scala/subscribers","subscription_url":"https://api.github.com/repos/kmruiz/scala/subscription","commits_url":"https://api.github.com/repos/kmruiz/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmruiz/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmruiz/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmruiz/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmruiz/scala/contents/{+path}","compare_url":"https://api.github.com/repos/kmruiz/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmruiz/scala/merges","archive_url":"https://api.github.com/repos/kmruiz/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmruiz/scala/downloads","issues_url":"https://api.github.com/repos/kmruiz/scala/issues{/number}","pulls_url":"https://api.github.com/repos/kmruiz/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/kmruiz/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/kmruiz/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmruiz/scala/labels{/name}","releases_url":"https://api.github.com/repos/kmruiz/scala/releases{/id}","created_at":"2015-07-31T22:38:41Z","updated_at":"2015-07-31T22:39:04Z","pushed_at":"2015-08-03T13:34:01Z","git_url":"git://github.com/kmruiz/scala.git","ssh_url":"git@github.com:kmruiz/scala.git","clone_url":"https://github.com/kmruiz/scala.git","svn_url":"https://github.com/kmruiz/scala","homepage":"http://www.scala-lang.org/","size":194211,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.11.x"}},"base":{"label":"scala:2.11.x","ref":"2.11.x","sha":"a745f06e35e070061348e95725afb0def8ca45de","user":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"repo":{"id":2888818,"name":"scala","full_name":"scala/scala","owner":{"login":"scala","id":57059,"avatar_url":"https://avatars.githubusercontent.com/u/57059?v=3","gravatar_id":"","url":"https://api.github.com/users/scala","html_url":"https://github.com/scala","followers_url":"https://api.github.com/users/scala/followers","following_url":"https://api.github.com/users/scala/following{/other_user}","gists_url":"https://api.github.com/users/scala/gists{/gist_id}","starred_url":"https://api.github.com/users/scala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala/subscriptions","organizations_url":"https://api.github.com/users/scala/orgs","repos_url":"https://api.github.com/users/scala/repos","events_url":"https://api.github.com/users/scala/events{/privacy}","received_events_url":"https://api.github.com/users/scala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala/scala","description":"The Scala programming language","fork":false,"url":"https://api.github.com/repos/scala/scala","forks_url":"https://api.github.com/repos/scala/scala/forks","keys_url":"https://api.github.com/repos/scala/scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala/scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala/scala/teams","hooks_url":"https://api.github.com/repos/scala/scala/hooks","issue_events_url":"https://api.github.com/repos/scala/scala/issues/events{/number}","events_url":"https://api.github.com/repos/scala/scala/events","assignees_url":"https://api.github.com/repos/scala/scala/assignees{/user}","branches_url":"https://api.github.com/repos/scala/scala/branches{/branch}","tags_url":"https://api.github.com/repos/scala/scala/tags","blobs_url":"https://api.github.com/repos/scala/scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala/scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala/scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala/scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala/scala/statuses/{sha}","languages_url":"https://api.github.com/repos/scala/scala/languages","stargazers_url":"https://api.github.com/repos/scala/scala/stargazers","contributors_url":"https://api.github.com/repos/scala/scala/contributors","subscribers_url":"https://api.github.com/repos/scala/scala/subscribers","subscription_url":"https://api.github.com/repos/scala/scala/subscription","commits_url":"https://api.github.com/repos/scala/scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala/scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala/scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala/scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/scala/scala/contents/{+path}","compare_url":"https://api.github.com/repos/scala/scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala/scala/merges","archive_url":"https://api.github.com/repos/scala/scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala/scala/downloads","issues_url":"https://api.github.com/repos/scala/scala/issues{/number}","pulls_url":"https://api.github.com/repos/scala/scala/pulls{/number}","milestones_url":"https://api.github.com/repos/scala/scala/milestones{/number}","notifications_url":"https://api.github.com/repos/scala/scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala/scala/labels{/name}","releases_url":"https://api.github.com/repos/scala/scala/releases{/id}","created_at":"2011-12-01T05:02:34Z","updated_at":"2015-08-03T17:18:35Z","pushed_at":"2015-08-03T13:34:08Z","git_url":"git://github.com/scala/scala.git","ssh_url":"git@github.com:scala/scala.git","clone_url":"https://github.com/scala/scala.git","svn_url":"https://github.com/scala/scala","homepage":"http://www.scala-lang.org/","size":194211,"stargazers_count":4586,"watchers_count":4586,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1176,"mirror_url":null,"open_issues_count":27,"forks":1176,"open_issues":27,"watchers":4586,"default_branch":"2.11.x"}},"_links":{"self":{"href":"https://api.github.com/repos/scala/scala/pulls/4676"},"html":{"href":"https://github.com/scala/scala/pull/4676"},"issue":{"href":"https://api.github.com/repos/scala/scala/issues/4676"},"comments":{"href":"https://api.github.com/repos/scala/scala/issues/4676/comments"},"review_comments":{"href":"https://api.github.com/repos/scala/scala/pulls/4676/comments"},"review_comment":{"href":"https://api.github.com/repos/scala/scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scala/scala/pulls/4676/commits"},"statuses":{"href":"https://api.github.com/repos/scala/scala/statuses/cc202f978e5aeac98b44a412f1404719948c9278"}}}}