{"action":"created","comment":{"url":"https://api.github.com/repos/jashkenas/underscore/pulls/comments/45853153","id":45853153,"diff_hunk":"@@ -56,16 +56,16 @@\n \n   test('last', function(assert) {\n     assert.equal(_.last([1, 2, 3]), 3, 'can pull out the last element of an array');\n-    assert.deepEqual(_.last([1, 2, 3], 0), [], 'can pass an index to last');\n-    assert.deepEqual(_.last([1, 2, 3], 2), [2, 3], 'can pass an index to last');\n-    assert.deepEqual(_.last([1, 2, 3], 5), [1, 2, 3], 'can pass an index to last');\n+    assert.equal(_([1, 2, 3]).last(), 3, 'can perform OO-style \"last()\"');\n+    assert.deepEqual(_.last([1, 2, 3], 0), [], 'can fetch the last 0 elements');\n+    assert.deepEqual(_.last([1, 2, 3], 2), [2, 3], 'can fetch the last n elements');\n+    assert.deepEqual(_.last([1, 2, 3], 5), [1, 2, 3], 'returns the whole array if n > length');\n     var result = (function(){ return _(arguments).last(); }(1, 2, 3, 4));\n     assert.equal(result, 4, 'works on an arguments object');\n     result = _.map([[1, 2, 3], [1, 2, 3]], _.last);\n     assert.deepEqual(result, [3, 3], 'works well with _.map');\n-\n-    assert.equal(_.last(null), void 0, 'handles nulls');\n-    assert.strictEqual(_.last([1, 2, 3], -1).length, 0);\n+    assert.equal(_.last(null), void 0, 'returns undefined when called on null');\n+    assert.deepEqual(_.last([1, 2, 3], -1), [], 'returns an empty array when asked for -n elements');","path":"test/arrays.js","position":19,"original_position":19,"commit_id":"cd95bf5b4dec2dab623f59baf4aa58b3a6327892","original_commit_id":"cd95bf5b4dec2dab623f59baf4aa58b3a6327892","user":{"login":"michaelficarra","id":218840,"avatar_url":"https://avatars.githubusercontent.com/u/218840?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelficarra","html_url":"https://github.com/michaelficarra","followers_url":"https://api.github.com/users/michaelficarra/followers","following_url":"https://api.github.com/users/michaelficarra/following{/other_user}","gists_url":"https://api.github.com/users/michaelficarra/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelficarra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelficarra/subscriptions","organizations_url":"https://api.github.com/users/michaelficarra/orgs","repos_url":"https://api.github.com/users/michaelficarra/repos","events_url":"https://api.github.com/users/michaelficarra/events{/privacy}","received_events_url":"https://api.github.com/users/michaelficarra/received_events","type":"User","site_admin":false},"body":"There's one property with multiple assertions to ensure that it holds. The message should describe the property, not the particular assertion, in my opinion.","created_at":"2015-11-25T10:50:53Z","updated_at":"2015-11-25T10:50:53Z","html_url":"https://github.com/jashkenas/underscore/pull/2360#discussion_r45853153","pull_request_url":"https://api.github.com/repos/jashkenas/underscore/pulls/2360","_links":{"self":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/comments/45853153"},"html":{"href":"https://github.com/jashkenas/underscore/pull/2360#discussion_r45853153"},"pull_request":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/2360"}}},"pull_request":{"url":"https://api.github.com/repos/jashkenas/underscore/pulls/2360","id":51729280,"html_url":"https://github.com/jashkenas/underscore/pull/2360","diff_url":"https://github.com/jashkenas/underscore/pull/2360.diff","patch_url":"https://github.com/jashkenas/underscore/pull/2360.patch","issue_url":"https://api.github.com/repos/jashkenas/underscore/issues/2360","number":2360,"state":"open","locked":false,"title":"Clean up assertions for _.last()","user":{"login":"captbaritone","id":162735,"avatar_url":"https://avatars.githubusercontent.com/u/162735?v=3","gravatar_id":"","url":"https://api.github.com/users/captbaritone","html_url":"https://github.com/captbaritone","followers_url":"https://api.github.com/users/captbaritone/followers","following_url":"https://api.github.com/users/captbaritone/following{/other_user}","gists_url":"https://api.github.com/users/captbaritone/gists{/gist_id}","starred_url":"https://api.github.com/users/captbaritone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captbaritone/subscriptions","organizations_url":"https://api.github.com/users/captbaritone/orgs","repos_url":"https://api.github.com/users/captbaritone/repos","events_url":"https://api.github.com/users/captbaritone/events{/privacy}","received_events_url":"https://api.github.com/users/captbaritone/received_events","type":"User","site_admin":false},"body":"Makes assertions consistent with `_.first()`'s assertions. This involved\r\nrewording the descriptions, adding a test for the object oriented version of\r\n`_.last()`, and making the `-n` assertion explicitly check for an empty array.","created_at":"2015-11-24T22:52:41Z","updated_at":"2015-11-25T10:50:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ed1bde87a7e311484658ebecdafcc01f9a6436a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jashkenas/underscore/pulls/2360/commits","review_comments_url":"https://api.github.com/repos/jashkenas/underscore/pulls/2360/comments","review_comment_url":"https://api.github.com/repos/jashkenas/underscore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jashkenas/underscore/issues/2360/comments","statuses_url":"https://api.github.com/repos/jashkenas/underscore/statuses/cd95bf5b4dec2dab623f59baf4aa58b3a6327892","head":{"label":"captbaritone:test-cleanups-last","ref":"test-cleanups-last","sha":"cd95bf5b4dec2dab623f59baf4aa58b3a6327892","user":{"login":"captbaritone","id":162735,"avatar_url":"https://avatars.githubusercontent.com/u/162735?v=3","gravatar_id":"","url":"https://api.github.com/users/captbaritone","html_url":"https://github.com/captbaritone","followers_url":"https://api.github.com/users/captbaritone/followers","following_url":"https://api.github.com/users/captbaritone/following{/other_user}","gists_url":"https://api.github.com/users/captbaritone/gists{/gist_id}","starred_url":"https://api.github.com/users/captbaritone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captbaritone/subscriptions","organizations_url":"https://api.github.com/users/captbaritone/orgs","repos_url":"https://api.github.com/users/captbaritone/repos","events_url":"https://api.github.com/users/captbaritone/events{/privacy}","received_events_url":"https://api.github.com/users/captbaritone/received_events","type":"User","site_admin":false},"repo":{"id":46395827,"name":"underscore","full_name":"captbaritone/underscore","owner":{"login":"captbaritone","id":162735,"avatar_url":"https://avatars.githubusercontent.com/u/162735?v=3","gravatar_id":"","url":"https://api.github.com/users/captbaritone","html_url":"https://github.com/captbaritone","followers_url":"https://api.github.com/users/captbaritone/followers","following_url":"https://api.github.com/users/captbaritone/following{/other_user}","gists_url":"https://api.github.com/users/captbaritone/gists{/gist_id}","starred_url":"https://api.github.com/users/captbaritone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captbaritone/subscriptions","organizations_url":"https://api.github.com/users/captbaritone/orgs","repos_url":"https://api.github.com/users/captbaritone/repos","events_url":"https://api.github.com/users/captbaritone/events{/privacy}","received_events_url":"https://api.github.com/users/captbaritone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/captbaritone/underscore","description":"JavaScript's utility _ belt","fork":true,"url":"https://api.github.com/repos/captbaritone/underscore","forks_url":"https://api.github.com/repos/captbaritone/underscore/forks","keys_url":"https://api.github.com/repos/captbaritone/underscore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/captbaritone/underscore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/captbaritone/underscore/teams","hooks_url":"https://api.github.com/repos/captbaritone/underscore/hooks","issue_events_url":"https://api.github.com/repos/captbaritone/underscore/issues/events{/number}","events_url":"https://api.github.com/repos/captbaritone/underscore/events","assignees_url":"https://api.github.com/repos/captbaritone/underscore/assignees{/user}","branches_url":"https://api.github.com/repos/captbaritone/underscore/branches{/branch}","tags_url":"https://api.github.com/repos/captbaritone/underscore/tags","blobs_url":"https://api.github.com/repos/captbaritone/underscore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/captbaritone/underscore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/captbaritone/underscore/git/refs{/sha}","trees_url":"https://api.github.com/repos/captbaritone/underscore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/captbaritone/underscore/statuses/{sha}","languages_url":"https://api.github.com/repos/captbaritone/underscore/languages","stargazers_url":"https://api.github.com/repos/captbaritone/underscore/stargazers","contributors_url":"https://api.github.com/repos/captbaritone/underscore/contributors","subscribers_url":"https://api.github.com/repos/captbaritone/underscore/subscribers","subscription_url":"https://api.github.com/repos/captbaritone/underscore/subscription","commits_url":"https://api.github.com/repos/captbaritone/underscore/commits{/sha}","git_commits_url":"https://api.github.com/repos/captbaritone/underscore/git/commits{/sha}","comments_url":"https://api.github.com/repos/captbaritone/underscore/comments{/number}","issue_comment_url":"https://api.github.com/repos/captbaritone/underscore/issues/comments{/number}","contents_url":"https://api.github.com/repos/captbaritone/underscore/contents/{+path}","compare_url":"https://api.github.com/repos/captbaritone/underscore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/captbaritone/underscore/merges","archive_url":"https://api.github.com/repos/captbaritone/underscore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/captbaritone/underscore/downloads","issues_url":"https://api.github.com/repos/captbaritone/underscore/issues{/number}","pulls_url":"https://api.github.com/repos/captbaritone/underscore/pulls{/number}","milestones_url":"https://api.github.com/repos/captbaritone/underscore/milestones{/number}","notifications_url":"https://api.github.com/repos/captbaritone/underscore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/captbaritone/underscore/labels{/name}","releases_url":"https://api.github.com/repos/captbaritone/underscore/releases{/id}","created_at":"2015-11-18T04:46:35Z","updated_at":"2015-11-18T04:46:37Z","pushed_at":"2015-11-24T23:38:49Z","git_url":"git://github.com/captbaritone/underscore.git","ssh_url":"git@github.com:captbaritone/underscore.git","clone_url":"https://github.com/captbaritone/underscore.git","svn_url":"https://github.com/captbaritone/underscore","homepage":"http://underscorejs.org","size":4806,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jashkenas:master","ref":"master","sha":"19b1e463c63b271e0eb64f83f24855cdfa216c07","user":{"login":"jashkenas","id":4732,"avatar_url":"https://avatars.githubusercontent.com/u/4732?v=3","gravatar_id":"","url":"https://api.github.com/users/jashkenas","html_url":"https://github.com/jashkenas","followers_url":"https://api.github.com/users/jashkenas/followers","following_url":"https://api.github.com/users/jashkenas/following{/other_user}","gists_url":"https://api.github.com/users/jashkenas/gists{/gist_id}","starred_url":"https://api.github.com/users/jashkenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jashkenas/subscriptions","organizations_url":"https://api.github.com/users/jashkenas/orgs","repos_url":"https://api.github.com/users/jashkenas/repos","events_url":"https://api.github.com/users/jashkenas/events{/privacy}","received_events_url":"https://api.github.com/users/jashkenas/received_events","type":"User","site_admin":false},"repo":{"id":349241,"name":"underscore","full_name":"jashkenas/underscore","owner":{"login":"jashkenas","id":4732,"avatar_url":"https://avatars.githubusercontent.com/u/4732?v=3","gravatar_id":"","url":"https://api.github.com/users/jashkenas","html_url":"https://github.com/jashkenas","followers_url":"https://api.github.com/users/jashkenas/followers","following_url":"https://api.github.com/users/jashkenas/following{/other_user}","gists_url":"https://api.github.com/users/jashkenas/gists{/gist_id}","starred_url":"https://api.github.com/users/jashkenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jashkenas/subscriptions","organizations_url":"https://api.github.com/users/jashkenas/orgs","repos_url":"https://api.github.com/users/jashkenas/repos","events_url":"https://api.github.com/users/jashkenas/events{/privacy}","received_events_url":"https://api.github.com/users/jashkenas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jashkenas/underscore","description":"JavaScript's utility _ belt","fork":false,"url":"https://api.github.com/repos/jashkenas/underscore","forks_url":"https://api.github.com/repos/jashkenas/underscore/forks","keys_url":"https://api.github.com/repos/jashkenas/underscore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jashkenas/underscore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jashkenas/underscore/teams","hooks_url":"https://api.github.com/repos/jashkenas/underscore/hooks","issue_events_url":"https://api.github.com/repos/jashkenas/underscore/issues/events{/number}","events_url":"https://api.github.com/repos/jashkenas/underscore/events","assignees_url":"https://api.github.com/repos/jashkenas/underscore/assignees{/user}","branches_url":"https://api.github.com/repos/jashkenas/underscore/branches{/branch}","tags_url":"https://api.github.com/repos/jashkenas/underscore/tags","blobs_url":"https://api.github.com/repos/jashkenas/underscore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jashkenas/underscore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jashkenas/underscore/git/refs{/sha}","trees_url":"https://api.github.com/repos/jashkenas/underscore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jashkenas/underscore/statuses/{sha}","languages_url":"https://api.github.com/repos/jashkenas/underscore/languages","stargazers_url":"https://api.github.com/repos/jashkenas/underscore/stargazers","contributors_url":"https://api.github.com/repos/jashkenas/underscore/contributors","subscribers_url":"https://api.github.com/repos/jashkenas/underscore/subscribers","subscription_url":"https://api.github.com/repos/jashkenas/underscore/subscription","commits_url":"https://api.github.com/repos/jashkenas/underscore/commits{/sha}","git_commits_url":"https://api.github.com/repos/jashkenas/underscore/git/commits{/sha}","comments_url":"https://api.github.com/repos/jashkenas/underscore/comments{/number}","issue_comment_url":"https://api.github.com/repos/jashkenas/underscore/issues/comments{/number}","contents_url":"https://api.github.com/repos/jashkenas/underscore/contents/{+path}","compare_url":"https://api.github.com/repos/jashkenas/underscore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jashkenas/underscore/merges","archive_url":"https://api.github.com/repos/jashkenas/underscore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jashkenas/underscore/downloads","issues_url":"https://api.github.com/repos/jashkenas/underscore/issues{/number}","pulls_url":"https://api.github.com/repos/jashkenas/underscore/pulls{/number}","milestones_url":"https://api.github.com/repos/jashkenas/underscore/milestones{/number}","notifications_url":"https://api.github.com/repos/jashkenas/underscore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jashkenas/underscore/labels{/name}","releases_url":"https://api.github.com/repos/jashkenas/underscore/releases{/id}","created_at":"2009-10-25T18:31:06Z","updated_at":"2015-11-25T09:26:40Z","pushed_at":"2015-11-24T23:39:38Z","git_url":"git://github.com/jashkenas/underscore.git","ssh_url":"git@github.com:jashkenas/underscore.git","clone_url":"https://github.com/jashkenas/underscore.git","svn_url":"https://github.com/jashkenas/underscore","homepage":"http://underscorejs.org","size":10444,"stargazers_count":16516,"watchers_count":16516,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3723,"mirror_url":null,"open_issues_count":64,"forks":3723,"open_issues":64,"watchers":16516,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/2360"},"html":{"href":"https://github.com/jashkenas/underscore/pull/2360"},"issue":{"href":"https://api.github.com/repos/jashkenas/underscore/issues/2360"},"comments":{"href":"https://api.github.com/repos/jashkenas/underscore/issues/2360/comments"},"review_comments":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/2360/comments"},"review_comment":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jashkenas/underscore/pulls/2360/commits"},"statuses":{"href":"https://api.github.com/repos/jashkenas/underscore/statuses/cd95bf5b4dec2dab623f59baf4aa58b3a6327892"}}}}