{"action":"closed","number":6297,"pull_request":{"url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297","id":215770451,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NzcwNDUx","html_url":"https://github.com/rubocop-hq/rubocop/pull/6297","diff_url":"https://github.com/rubocop-hq/rubocop/pull/6297.diff","patch_url":"https://github.com/rubocop-hq/rubocop/pull/6297.patch","issue_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6297","number":6297,"state":"closed","locked":false,"title":"[Fix #6296] Fix an auto-correct error for `Style/For`","user":{"login":"autopp","id":7571111,"node_id":"MDQ6VXNlcjc1NzExMTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7571111?v=4","gravatar_id":"","url":"https://api.github.com/users/autopp","html_url":"https://github.com/autopp","followers_url":"https://api.github.com/users/autopp/followers","following_url":"https://api.github.com/users/autopp/following{/other_user}","gists_url":"https://api.github.com/users/autopp/gists{/gist_id}","starred_url":"https://api.github.com/users/autopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopp/subscriptions","organizations_url":"https://api.github.com/users/autopp/orgs","repos_url":"https://api.github.com/users/autopp/repos","events_url":"https://api.github.com/users/autopp/events{/privacy}","received_events_url":"https://api.github.com/users/autopp/received_events","type":"User","site_admin":false},"body":"This PR fixes #6296.\r\n\r\nAuto-correction of `Style/For` raises `NoMethodError`when `EnforcedStyle` is `each` and `for` loop dose not have `do` or semicolon.\r\n\r\nThis is due to `begin` of the node's location becoming `nil`.\r\nSo, in such a case, `end_pos` of the enumeration target is set to the end of the replacement range.\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] 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] The PR relates to *only* one subject with a clear title\r\n  and description in grammatically correct, complete sentences.\r\n* [x] Run `rake default`. It executes all tests and RuboCop for itself, and generates the documentation.\r\n\r\n[1]: http://chris.beams.io/posts/git-commit/\r\n","created_at":"2018-09-15T13:57:19Z","updated_at":"2018-09-18T00:03:39Z","closed_at":"2018-09-18T00:03:39Z","merged_at":"2018-09-18T00:03:39Z","merge_commit_sha":"048ade143197be42636ee2018e956cc9f6b01799","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297/commits","review_comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297/comments","review_comment_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6297/comments","statuses_url":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/ed22d66fabf271598ffdaf6a78d842648575467d","head":{"label":"autopp:fix-auto-correct-of-style-for","ref":"fix-auto-correct-of-style-for","sha":"ed22d66fabf271598ffdaf6a78d842648575467d","user":{"login":"autopp","id":7571111,"node_id":"MDQ6VXNlcjc1NzExMTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7571111?v=4","gravatar_id":"","url":"https://api.github.com/users/autopp","html_url":"https://github.com/autopp","followers_url":"https://api.github.com/users/autopp/followers","following_url":"https://api.github.com/users/autopp/following{/other_user}","gists_url":"https://api.github.com/users/autopp/gists{/gist_id}","starred_url":"https://api.github.com/users/autopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopp/subscriptions","organizations_url":"https://api.github.com/users/autopp/orgs","repos_url":"https://api.github.com/users/autopp/repos","events_url":"https://api.github.com/users/autopp/events{/privacy}","received_events_url":"https://api.github.com/users/autopp/received_events","type":"User","site_admin":false},"repo":{"id":148877491,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4Nzc0OTE=","name":"rubocop","full_name":"autopp/rubocop","private":false,"owner":{"login":"autopp","id":7571111,"node_id":"MDQ6VXNlcjc1NzExMTE=","avatar_url":"https://avatars2.githubusercontent.com/u/7571111?v=4","gravatar_id":"","url":"https://api.github.com/users/autopp","html_url":"https://github.com/autopp","followers_url":"https://api.github.com/users/autopp/followers","following_url":"https://api.github.com/users/autopp/following{/other_user}","gists_url":"https://api.github.com/users/autopp/gists{/gist_id}","starred_url":"https://api.github.com/users/autopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopp/subscriptions","organizations_url":"https://api.github.com/users/autopp/orgs","repos_url":"https://api.github.com/users/autopp/repos","events_url":"https://api.github.com/users/autopp/events{/privacy}","received_events_url":"https://api.github.com/users/autopp/received_events","type":"User","site_admin":false},"html_url":"https://github.com/autopp/rubocop","description":"A Ruby static code analyzer and formatter, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/autopp/rubocop","forks_url":"https://api.github.com/repos/autopp/rubocop/forks","keys_url":"https://api.github.com/repos/autopp/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autopp/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autopp/rubocop/teams","hooks_url":"https://api.github.com/repos/autopp/rubocop/hooks","issue_events_url":"https://api.github.com/repos/autopp/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/autopp/rubocop/events","assignees_url":"https://api.github.com/repos/autopp/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/autopp/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/autopp/rubocop/tags","blobs_url":"https://api.github.com/repos/autopp/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autopp/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autopp/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/autopp/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autopp/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/autopp/rubocop/languages","stargazers_url":"https://api.github.com/repos/autopp/rubocop/stargazers","contributors_url":"https://api.github.com/repos/autopp/rubocop/contributors","subscribers_url":"https://api.github.com/repos/autopp/rubocop/subscribers","subscription_url":"https://api.github.com/repos/autopp/rubocop/subscription","commits_url":"https://api.github.com/repos/autopp/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/autopp/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/autopp/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/autopp/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/autopp/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/autopp/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autopp/rubocop/merges","archive_url":"https://api.github.com/repos/autopp/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autopp/rubocop/downloads","issues_url":"https://api.github.com/repos/autopp/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/autopp/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/autopp/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/autopp/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autopp/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/autopp/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/autopp/rubocop/deployments","created_at":"2018-09-15T06:49:33Z","updated_at":"2018-09-15T06:49:39Z","pushed_at":"2018-09-15T16:11:14Z","git_url":"git://github.com/autopp/rubocop.git","ssh_url":"git@github.com:autopp/rubocop.git","clone_url":"https://github.com/autopp/rubocop.git","svn_url":"https://github.com/autopp/rubocop","homepage":"http://docs.rubocop.org","size":22972,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubocop-hq:master","ref":"master","sha":"4f940b4b610e8dbd42aee56b8dc462ede4d8207e","user":{"login":"rubocop-hq","id":39672756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyNzU2","avatar_url":"https://avatars3.githubusercontent.com/u/39672756?v=4","gravatar_id":"","url":"https://api.github.com/users/rubocop-hq","html_url":"https://github.com/rubocop-hq","followers_url":"https://api.github.com/users/rubocop-hq/followers","following_url":"https://api.github.com/users/rubocop-hq/following{/other_user}","gists_url":"https://api.github.com/users/rubocop-hq/gists{/gist_id}","starred_url":"https://api.github.com/users/rubocop-hq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubocop-hq/subscriptions","organizations_url":"https://api.github.com/users/rubocop-hq/orgs","repos_url":"https://api.github.com/users/rubocop-hq/repos","events_url":"https://api.github.com/users/rubocop-hq/events{/privacy}","received_events_url":"https://api.github.com/users/rubocop-hq/received_events","type":"Organization","site_admin":false},"repo":{"id":4095287,"node_id":"MDEwOlJlcG9zaXRvcnk0MDk1Mjg3","name":"rubocop","full_name":"rubocop-hq/rubocop","private":false,"owner":{"login":"rubocop-hq","id":39672756,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyNzU2","avatar_url":"https://avatars3.githubusercontent.com/u/39672756?v=4","gravatar_id":"","url":"https://api.github.com/users/rubocop-hq","html_url":"https://github.com/rubocop-hq","followers_url":"https://api.github.com/users/rubocop-hq/followers","following_url":"https://api.github.com/users/rubocop-hq/following{/other_user}","gists_url":"https://api.github.com/users/rubocop-hq/gists{/gist_id}","starred_url":"https://api.github.com/users/rubocop-hq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubocop-hq/subscriptions","organizations_url":"https://api.github.com/users/rubocop-hq/orgs","repos_url":"https://api.github.com/users/rubocop-hq/repos","events_url":"https://api.github.com/users/rubocop-hq/events{/privacy}","received_events_url":"https://api.github.com/users/rubocop-hq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rubocop-hq/rubocop","description":"A Ruby static code analyzer and formatter, based on the community Ruby style guide.","fork":false,"url":"https://api.github.com/repos/rubocop-hq/rubocop","forks_url":"https://api.github.com/repos/rubocop-hq/rubocop/forks","keys_url":"https://api.github.com/repos/rubocop-hq/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubocop-hq/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubocop-hq/rubocop/teams","hooks_url":"https://api.github.com/repos/rubocop-hq/rubocop/hooks","issue_events_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/rubocop-hq/rubocop/events","assignees_url":"https://api.github.com/repos/rubocop-hq/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/rubocop-hq/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/rubocop-hq/rubocop/tags","blobs_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/rubocop-hq/rubocop/languages","stargazers_url":"https://api.github.com/repos/rubocop-hq/rubocop/stargazers","contributors_url":"https://api.github.com/repos/rubocop-hq/rubocop/contributors","subscribers_url":"https://api.github.com/repos/rubocop-hq/rubocop/subscribers","subscription_url":"https://api.github.com/repos/rubocop-hq/rubocop/subscription","commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubocop-hq/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubocop-hq/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/rubocop-hq/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubocop-hq/rubocop/merges","archive_url":"https://api.github.com/repos/rubocop-hq/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubocop-hq/rubocop/downloads","issues_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/rubocop-hq/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/rubocop-hq/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/rubocop-hq/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubocop-hq/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/rubocop-hq/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/rubocop-hq/rubocop/deployments","created_at":"2012-04-21T10:09:58Z","updated_at":"2018-09-17T18:46:46Z","pushed_at":"2018-09-18T00:03:39Z","git_url":"git://github.com/rubocop-hq/rubocop.git","ssh_url":"git@github.com:rubocop-hq/rubocop.git","clone_url":"https://github.com/rubocop-hq/rubocop.git","svn_url":"https://github.com/rubocop-hq/rubocop","homepage":"http://docs.rubocop.org","size":23071,"stargazers_count":9377,"watchers_count":9377,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1887,"mirror_url":null,"archived":false,"open_issues_count":307,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1887,"open_issues":307,"watchers":9377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297"},"html":{"href":"https://github.com/rubocop-hq/rubocop/pull/6297"},"issue":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6297"},"comments":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6297/comments"},"review_comments":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297/comments"},"review_comment":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/pulls/6297/commits"},"statuses":{"href":"https://api.github.com/repos/rubocop-hq/rubocop/statuses/ed22d66fabf271598ffdaf6a78d842648575467d"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"koic","id":13203,"node_id":"MDQ6VXNlcjEzMjAz","avatar_url":"https://avatars3.githubusercontent.com/u/13203?v=4","gravatar_id":"","url":"https://api.github.com/users/koic","html_url":"https://github.com/koic","followers_url":"https://api.github.com/users/koic/followers","following_url":"https://api.github.com/users/koic/following{/other_user}","gists_url":"https://api.github.com/users/koic/gists{/gist_id}","starred_url":"https://api.github.com/users/koic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koic/subscriptions","organizations_url":"https://api.github.com/users/koic/orgs","repos_url":"https://api.github.com/users/koic/repos","events_url":"https://api.github.com/users/koic/events{/privacy}","received_events_url":"https://api.github.com/users/koic/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":26,"deletions":1,"changed_files":3}}
{"actor":{"display_login":"koic"}}