{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/170419092","pull_request_review_id":99110369,"id":170419092,"diff_hunk":"@@ -338,6 +328,15 @@ public bool TryGetArray(out ArraySegment<T> arraySegment)\n                 arraySegment = new ArraySegment<T>(arr, _index, _length);\n                 return true;\n             }\n+            else if (_length == 0)","path":"src/mscorlib/shared/System/Memory.cs","position":4,"original_position":21,"commit_id":"857863d705441e64d1628dc28a0ebf965f996f8b","original_commit_id":"857863d705441e64d1628dc28a0ebf965f996f8b","user":{"login":"stephentoub","id":2642209,"avatar_url":"https://avatars0.githubusercontent.com/u/2642209?v=4","gravatar_id":"","url":"https://api.github.com/users/stephentoub","html_url":"https://github.com/stephentoub","followers_url":"https://api.github.com/users/stephentoub/followers","following_url":"https://api.github.com/users/stephentoub/following{/other_user}","gists_url":"https://api.github.com/users/stephentoub/gists{/gist_id}","starred_url":"https://api.github.com/users/stephentoub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephentoub/subscriptions","organizations_url":"https://api.github.com/users/stephentoub/orgs","repos_url":"https://api.github.com/users/stephentoub/repos","events_url":"https://api.github.com/users/stephentoub/events{/privacy}","received_events_url":"https://api.github.com/users/stephentoub/received_events","type":"User","site_admin":false},"body":"With \"else\", this won't kick in for an owned memory that doesn't wrap an array. Is that what's desired?","created_at":"2018-02-24T11:28:34Z","updated_at":"2018-02-24T11:28:34Z","html_url":"https://github.com/dotnet/coreclr/pull/16529#discussion_r170419092","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/16529","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/170419092"},"html":{"href":"https://github.com/dotnet/coreclr/pull/16529#discussion_r170419092"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/16529"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/16529","id":171091752,"html_url":"https://github.com/dotnet/coreclr/pull/16529","diff_url":"https://github.com/dotnet/coreclr/pull/16529.diff","patch_url":"https://github.com/dotnet/coreclr/pull/16529.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/16529","number":16529,"state":"open","locked":false,"title":"Return empty array if length is zero","user":{"login":"kasper3","id":33230602,"avatar_url":"https://avatars3.githubusercontent.com/u/33230602?v=4","gravatar_id":"","url":"https://api.github.com/users/kasper3","html_url":"https://github.com/kasper3","followers_url":"https://api.github.com/users/kasper3/followers","following_url":"https://api.github.com/users/kasper3/following{/other_user}","gists_url":"https://api.github.com/users/kasper3/gists{/gist_id}","starred_url":"https://api.github.com/users/kasper3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasper3/subscriptions","organizations_url":"https://api.github.com/users/kasper3/orgs","repos_url":"https://api.github.com/users/kasper3/repos","events_url":"https://api.github.com/users/kasper3/events{/privacy}","received_events_url":"https://api.github.com/users/kasper3/received_events","type":"User","site_admin":false},"body":"Resolves https://github.com/dotnet/corefx/issues/27412","created_at":"2018-02-23T19:05:09Z","updated_at":"2018-02-24T11:28:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"908ce5b15948c56a89414c9046d0c88871a06e96","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/16529/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/16529/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/16529/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/857863d705441e64d1628dc28a0ebf965f996f8b","head":{"label":"kasper3:master","ref":"master","sha":"857863d705441e64d1628dc28a0ebf965f996f8b","user":{"login":"kasper3","id":33230602,"avatar_url":"https://avatars3.githubusercontent.com/u/33230602?v=4","gravatar_id":"","url":"https://api.github.com/users/kasper3","html_url":"https://github.com/kasper3","followers_url":"https://api.github.com/users/kasper3/followers","following_url":"https://api.github.com/users/kasper3/following{/other_user}","gists_url":"https://api.github.com/users/kasper3/gists{/gist_id}","starred_url":"https://api.github.com/users/kasper3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasper3/subscriptions","organizations_url":"https://api.github.com/users/kasper3/orgs","repos_url":"https://api.github.com/users/kasper3/repos","events_url":"https://api.github.com/users/kasper3/events{/privacy}","received_events_url":"https://api.github.com/users/kasper3/received_events","type":"User","site_admin":false},"repo":{"id":122659719,"name":"coreclr","full_name":"kasper3/coreclr","owner":{"login":"kasper3","id":33230602,"avatar_url":"https://avatars3.githubusercontent.com/u/33230602?v=4","gravatar_id":"","url":"https://api.github.com/users/kasper3","html_url":"https://github.com/kasper3","followers_url":"https://api.github.com/users/kasper3/followers","following_url":"https://api.github.com/users/kasper3/following{/other_user}","gists_url":"https://api.github.com/users/kasper3/gists{/gist_id}","starred_url":"https://api.github.com/users/kasper3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasper3/subscriptions","organizations_url":"https://api.github.com/users/kasper3/orgs","repos_url":"https://api.github.com/users/kasper3/repos","events_url":"https://api.github.com/users/kasper3/events{/privacy}","received_events_url":"https://api.github.com/users/kasper3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kasper3/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called System.Private.Corelib (or mscorlib). It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. We welcome contributions.","fork":true,"url":"https://api.github.com/repos/kasper3/coreclr","forks_url":"https://api.github.com/repos/kasper3/coreclr/forks","keys_url":"https://api.github.com/repos/kasper3/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kasper3/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kasper3/coreclr/teams","hooks_url":"https://api.github.com/repos/kasper3/coreclr/hooks","issue_events_url":"https://api.github.com/repos/kasper3/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/kasper3/coreclr/events","assignees_url":"https://api.github.com/repos/kasper3/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/kasper3/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/kasper3/coreclr/tags","blobs_url":"https://api.github.com/repos/kasper3/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kasper3/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kasper3/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/kasper3/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kasper3/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/kasper3/coreclr/languages","stargazers_url":"https://api.github.com/repos/kasper3/coreclr/stargazers","contributors_url":"https://api.github.com/repos/kasper3/coreclr/contributors","subscribers_url":"https://api.github.com/repos/kasper3/coreclr/subscribers","subscription_url":"https://api.github.com/repos/kasper3/coreclr/subscription","commits_url":"https://api.github.com/repos/kasper3/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/kasper3/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/kasper3/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/kasper3/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/kasper3/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/kasper3/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kasper3/coreclr/merges","archive_url":"https://api.github.com/repos/kasper3/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kasper3/coreclr/downloads","issues_url":"https://api.github.com/repos/kasper3/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/kasper3/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/kasper3/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/kasper3/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kasper3/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/kasper3/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/kasper3/coreclr/deployments","created_at":"2018-02-23T18:46:15Z","updated_at":"2018-02-23T18:47:27Z","pushed_at":"2018-02-24T11:26:51Z","git_url":"git://github.com/kasper3/coreclr.git","ssh_url":"git@github.com:kasper3/coreclr.git","clone_url":"https://github.com/kasper3/coreclr.git","svn_url":"https://github.com/kasper3/coreclr","homepage":"https://github.com/dotnet/core","size":208496,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"6b27fa740ad44962093c5af4e6060011ec454a46","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called System.Private.Corelib (or mscorlib). It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2018-02-24T06:47:29Z","pushed_at":"2018-02-24T11:26:57Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://github.com/dotnet/core","size":208481,"stargazers_count":8971,"watchers_count":8971,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2256,"mirror_url":null,"archived":false,"open_issues_count":1540,"license":null,"forks":2256,"open_issues":1540,"watchers":8971,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/16529"},"html":{"href":"https://github.com/dotnet/coreclr/pull/16529"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/16529"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/16529/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/16529/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/16529/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/857863d705441e64d1628dc28a0ebf965f996f8b"}},"author_association":"NONE"}}
{"actor":{"display_login":"stephentoub"}}