{"action":"created","comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/101906812","pull_request_review_id":22650261,"id":101906812,"diff_hunk":"@@ -29,6 +29,24 @@\n       new_source = autocorrect_source(cop, 'test = Array.new')\n       expect(new_source).to eq('test = []')\n     end\n+\n+    it 'not auto-corrects Array.new with block' do","path":"spec/rubocop/cop/style/empty_literal_spec.rb","position":5,"original_position":5,"commit_id":"2b52171051d91f130653ab1b95558b04cc357cfc","original_commit_id":"2b52171051d91f130653ab1b95558b04cc357cfc","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"body":"not auto-corrects -> does not auto-correct","created_at":"2017-02-19T01:43:18Z","updated_at":"2017-02-19T01:43:18Z","html_url":"https://github.com/bbatsov/rubocop/pull/4049#discussion_r101906812","pull_request_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049","_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments/101906812"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/4049#discussion_r101906812"},"pull_request":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049"}}},"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049","id":106849458,"html_url":"https://github.com/bbatsov/rubocop/pull/4049","diff_url":"https://github.com/bbatsov/rubocop/pull/4049.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/4049.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/4049","number":4049,"state":"open","locked":false,"title":"Style/EmptyLiteral autocorrect bugfix","user":{"login":"ota42y","id":6755375,"avatar_url":"https://avatars.githubusercontent.com/u/6755375?v=3","gravatar_id":"","url":"https://api.github.com/users/ota42y","html_url":"https://github.com/ota42y","followers_url":"https://api.github.com/users/ota42y/followers","following_url":"https://api.github.com/users/ota42y/following{/other_user}","gists_url":"https://api.github.com/users/ota42y/gists{/gist_id}","starred_url":"https://api.github.com/users/ota42y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ota42y/subscriptions","organizations_url":"https://api.github.com/users/ota42y/orgs","repos_url":"https://api.github.com/users/ota42y/repos","events_url":"https://api.github.com/users/ota42y/events{/privacy}","received_events_url":"https://api.github.com/users/ota42y/received_events","type":"User","site_admin":false},"body":"Style/EmptyLiteral autocorrect `Array.new` to `[]`.\r\n\r\nThis code is valid code\r\n`Array.new { 1 }`\r\nbut, autocorrect change to this and it's invalid code.\r\n`[] { 1 }`\r\n\r\nSo, I change ignore autocorrect.\r\nI think, this is bad code (`Array.new { 1 }` equal to `[]`) so I fix autocorrect only.\r\n\r\n-----------------\r\n\r\nBefore submitting the PR make sure the following are checked:\r\n\r\n* [x] Wrote [good commit messages][1].\r\n* [x] Commit message starts with `[Fix #issue-number]` (if the related issue exists).\r\n* [x] Used the same coding conventions as the rest of the project.\r\n* [x] Feature branch is up-to-date with `master` (if not - rebase it).\r\n* [x] Squashed related commits together.\r\n* [x] Added tests.\r\n* [x] Added an entry to the [Changelog](../blob/master/CHANGELOG.md) if the new code introduces user-observable changes. See [changelog entry format](../blob/master/CONTRIBUTING.md#changelog-entry-format).\r\n* [x] All tests are passing.\r\n* [x] The new code doesn't generate RuboCop offenses.\r\n* [x] The PR relates to *only* one subject with a clear title\r\n  and description in grammatically correct, complete sentences.\r\n* [x] Updated cop documentation with `rake generate_cops_documentation` (required only when you've added a new cop or changed the configuration/documentation of an existing cop).\r\n\r\n[1]: http://chris.beams.io/posts/git-commit/\r\n","created_at":"2017-02-18T05:34:56Z","updated_at":"2017-02-19T01:43:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa200677f144ef5257050c3db73948690dac57af","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/4049/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/2b52171051d91f130653ab1b95558b04cc357cfc","head":{"label":"ota42y:ota42y/array_new_block_fix","ref":"ota42y/array_new_block_fix","sha":"2b52171051d91f130653ab1b95558b04cc357cfc","user":{"login":"ota42y","id":6755375,"avatar_url":"https://avatars.githubusercontent.com/u/6755375?v=3","gravatar_id":"","url":"https://api.github.com/users/ota42y","html_url":"https://github.com/ota42y","followers_url":"https://api.github.com/users/ota42y/followers","following_url":"https://api.github.com/users/ota42y/following{/other_user}","gists_url":"https://api.github.com/users/ota42y/gists{/gist_id}","starred_url":"https://api.github.com/users/ota42y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ota42y/subscriptions","organizations_url":"https://api.github.com/users/ota42y/orgs","repos_url":"https://api.github.com/users/ota42y/repos","events_url":"https://api.github.com/users/ota42y/events{/privacy}","received_events_url":"https://api.github.com/users/ota42y/received_events","type":"User","site_admin":false},"repo":{"id":82363041,"name":"rubocop","full_name":"ota42y/rubocop","owner":{"login":"ota42y","id":6755375,"avatar_url":"https://avatars.githubusercontent.com/u/6755375?v=3","gravatar_id":"","url":"https://api.github.com/users/ota42y","html_url":"https://github.com/ota42y","followers_url":"https://api.github.com/users/ota42y/followers","following_url":"https://api.github.com/users/ota42y/following{/other_user}","gists_url":"https://api.github.com/users/ota42y/gists{/gist_id}","starred_url":"https://api.github.com/users/ota42y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ota42y/subscriptions","organizations_url":"https://api.github.com/users/ota42y/orgs","repos_url":"https://api.github.com/users/ota42y/repos","events_url":"https://api.github.com/users/ota42y/events{/privacy}","received_events_url":"https://api.github.com/users/ota42y/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ota42y/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/ota42y/rubocop","forks_url":"https://api.github.com/repos/ota42y/rubocop/forks","keys_url":"https://api.github.com/repos/ota42y/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ota42y/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ota42y/rubocop/teams","hooks_url":"https://api.github.com/repos/ota42y/rubocop/hooks","issue_events_url":"https://api.github.com/repos/ota42y/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/ota42y/rubocop/events","assignees_url":"https://api.github.com/repos/ota42y/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/ota42y/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/ota42y/rubocop/tags","blobs_url":"https://api.github.com/repos/ota42y/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ota42y/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ota42y/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/ota42y/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ota42y/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/ota42y/rubocop/languages","stargazers_url":"https://api.github.com/repos/ota42y/rubocop/stargazers","contributors_url":"https://api.github.com/repos/ota42y/rubocop/contributors","subscribers_url":"https://api.github.com/repos/ota42y/rubocop/subscribers","subscription_url":"https://api.github.com/repos/ota42y/rubocop/subscription","commits_url":"https://api.github.com/repos/ota42y/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/ota42y/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/ota42y/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/ota42y/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/ota42y/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/ota42y/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ota42y/rubocop/merges","archive_url":"https://api.github.com/repos/ota42y/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ota42y/rubocop/downloads","issues_url":"https://api.github.com/repos/ota42y/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/ota42y/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/ota42y/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/ota42y/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ota42y/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/ota42y/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/ota42y/rubocop/deployments","created_at":"2017-02-18T05:07:53Z","updated_at":"2017-02-18T05:07:57Z","pushed_at":"2017-02-18T14:35:33Z","git_url":"git://github.com/ota42y/rubocop.git","ssh_url":"git@github.com:ota42y/rubocop.git","clone_url":"https://github.com/ota42y/rubocop.git","svn_url":"https://github.com/ota42y/rubocop","homepage":"http://rubocop.readthedocs.io","size":15133,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"bbatsov:master","ref":"master","sha":"d581b8d31473e0e34198d8fd7e69f04214f39880","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"repo":{"id":4095287,"name":"rubocop","full_name":"bbatsov/rubocop","owner":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbatsov/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":false,"url":"https://api.github.com/repos/bbatsov/rubocop","forks_url":"https://api.github.com/repos/bbatsov/rubocop/forks","keys_url":"https://api.github.com/repos/bbatsov/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbatsov/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbatsov/rubocop/teams","hooks_url":"https://api.github.com/repos/bbatsov/rubocop/hooks","issue_events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/bbatsov/rubocop/events","assignees_url":"https://api.github.com/repos/bbatsov/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/bbatsov/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/bbatsov/rubocop/tags","blobs_url":"https://api.github.com/repos/bbatsov/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbatsov/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbatsov/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbatsov/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/bbatsov/rubocop/languages","stargazers_url":"https://api.github.com/repos/bbatsov/rubocop/stargazers","contributors_url":"https://api.github.com/repos/bbatsov/rubocop/contributors","subscribers_url":"https://api.github.com/repos/bbatsov/rubocop/subscribers","subscription_url":"https://api.github.com/repos/bbatsov/rubocop/subscription","commits_url":"https://api.github.com/repos/bbatsov/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbatsov/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbatsov/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/bbatsov/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbatsov/rubocop/merges","archive_url":"https://api.github.com/repos/bbatsov/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbatsov/rubocop/downloads","issues_url":"https://api.github.com/repos/bbatsov/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/bbatsov/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/bbatsov/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/bbatsov/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbatsov/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/bbatsov/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/bbatsov/rubocop/deployments","created_at":"2012-04-21T10:09:58Z","updated_at":"2017-02-19T00:09:11Z","pushed_at":"2017-02-19T01:27:52Z","git_url":"git://github.com/bbatsov/rubocop.git","ssh_url":"git@github.com:bbatsov/rubocop.git","clone_url":"https://github.com/bbatsov/rubocop.git","svn_url":"https://github.com/bbatsov/rubocop","homepage":"http://rubocop.readthedocs.io","size":15052,"stargazers_count":7303,"watchers_count":7303,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1201,"mirror_url":null,"open_issues_count":176,"forks":1201,"open_issues":176,"watchers":7303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/4049"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/4049"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/4049/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/4049/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/2b52171051d91f130653ab1b95558b04cc357cfc"}}}}
{"actor":{"display_login":"bbatsov"}}