{"action":"opened","number":5175,"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175","id":156009188,"html_url":"https://github.com/bbatsov/rubocop/pull/5175","diff_url":"https://github.com/bbatsov/rubocop/pull/5175.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/5175.patch","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5175","number":5175,"state":"open","locked":false,"title":"Make Style/RedundantBegin aware of do-end block in Ruby 2.5","user":{"login":"pocke","id":4361134,"avatar_url":"https://avatars0.githubusercontent.com/u/4361134?v=4","gravatar_id":"","url":"https://api.github.com/users/pocke","html_url":"https://github.com/pocke","followers_url":"https://api.github.com/users/pocke/followers","following_url":"https://api.github.com/users/pocke/following{/other_user}","gists_url":"https://api.github.com/users/pocke/gists{/gist_id}","starred_url":"https://api.github.com/users/pocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocke/subscriptions","organizations_url":"https://api.github.com/users/pocke/orgs","repos_url":"https://api.github.com/users/pocke/repos","events_url":"https://api.github.com/users/pocke/events{/privacy}","received_events_url":"https://api.github.com/users/pocke/received_events","type":"User","site_admin":false},"body":"We can omit `begin` in `do-end` block since Ruby 2.5.\r\nhttps://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/57376\r\nFor example, this code is correct in Ruby 2.5.\r\n\r\n```ruby\r\ndo_something do\r\n  something\r\nrescue => ex\r\n  anything\r\nend\r\n```\r\n\r\nThis change will make Style/RedundantBegin aware of do-end block in Ruby 2.5.\r\n\r\n\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* [ ] 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* [ ] 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(`rake spec`) are passing.\r\n* [x] The new code doesn't generate RuboCop offenses that are checked by `rake internal_investigation`.\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-12-02T10:50:36Z","updated_at":"2017-12-02T10:50:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175/commits","review_comments_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175/comments","review_comment_url":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5175/comments","statuses_url":"https://api.github.com/repos/bbatsov/rubocop/statuses/d3c69b9405cd026962eb734d6bc118a73e1f059c","head":{"label":"pocke:Style/RedundantBegin-do-end","ref":"Style/RedundantBegin-do-end","sha":"d3c69b9405cd026962eb734d6bc118a73e1f059c","user":{"login":"pocke","id":4361134,"avatar_url":"https://avatars0.githubusercontent.com/u/4361134?v=4","gravatar_id":"","url":"https://api.github.com/users/pocke","html_url":"https://github.com/pocke","followers_url":"https://api.github.com/users/pocke/followers","following_url":"https://api.github.com/users/pocke/following{/other_user}","gists_url":"https://api.github.com/users/pocke/gists{/gist_id}","starred_url":"https://api.github.com/users/pocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocke/subscriptions","organizations_url":"https://api.github.com/users/pocke/orgs","repos_url":"https://api.github.com/users/pocke/repos","events_url":"https://api.github.com/users/pocke/events{/privacy}","received_events_url":"https://api.github.com/users/pocke/received_events","type":"User","site_admin":false},"repo":{"id":51196805,"name":"rubocop","full_name":"pocke/rubocop","owner":{"login":"pocke","id":4361134,"avatar_url":"https://avatars0.githubusercontent.com/u/4361134?v=4","gravatar_id":"","url":"https://api.github.com/users/pocke","html_url":"https://github.com/pocke","followers_url":"https://api.github.com/users/pocke/followers","following_url":"https://api.github.com/users/pocke/following{/other_user}","gists_url":"https://api.github.com/users/pocke/gists{/gist_id}","starred_url":"https://api.github.com/users/pocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocke/subscriptions","organizations_url":"https://api.github.com/users/pocke/orgs","repos_url":"https://api.github.com/users/pocke/repos","events_url":"https://api.github.com/users/pocke/events{/privacy}","received_events_url":"https://api.github.com/users/pocke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pocke/rubocop","description":"A Ruby static code analyzer, based on the community Ruby style guide.","fork":true,"url":"https://api.github.com/repos/pocke/rubocop","forks_url":"https://api.github.com/repos/pocke/rubocop/forks","keys_url":"https://api.github.com/repos/pocke/rubocop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pocke/rubocop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pocke/rubocop/teams","hooks_url":"https://api.github.com/repos/pocke/rubocop/hooks","issue_events_url":"https://api.github.com/repos/pocke/rubocop/issues/events{/number}","events_url":"https://api.github.com/repos/pocke/rubocop/events","assignees_url":"https://api.github.com/repos/pocke/rubocop/assignees{/user}","branches_url":"https://api.github.com/repos/pocke/rubocop/branches{/branch}","tags_url":"https://api.github.com/repos/pocke/rubocop/tags","blobs_url":"https://api.github.com/repos/pocke/rubocop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pocke/rubocop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pocke/rubocop/git/refs{/sha}","trees_url":"https://api.github.com/repos/pocke/rubocop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pocke/rubocop/statuses/{sha}","languages_url":"https://api.github.com/repos/pocke/rubocop/languages","stargazers_url":"https://api.github.com/repos/pocke/rubocop/stargazers","contributors_url":"https://api.github.com/repos/pocke/rubocop/contributors","subscribers_url":"https://api.github.com/repos/pocke/rubocop/subscribers","subscription_url":"https://api.github.com/repos/pocke/rubocop/subscription","commits_url":"https://api.github.com/repos/pocke/rubocop/commits{/sha}","git_commits_url":"https://api.github.com/repos/pocke/rubocop/git/commits{/sha}","comments_url":"https://api.github.com/repos/pocke/rubocop/comments{/number}","issue_comment_url":"https://api.github.com/repos/pocke/rubocop/issues/comments{/number}","contents_url":"https://api.github.com/repos/pocke/rubocop/contents/{+path}","compare_url":"https://api.github.com/repos/pocke/rubocop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pocke/rubocop/merges","archive_url":"https://api.github.com/repos/pocke/rubocop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pocke/rubocop/downloads","issues_url":"https://api.github.com/repos/pocke/rubocop/issues{/number}","pulls_url":"https://api.github.com/repos/pocke/rubocop/pulls{/number}","milestones_url":"https://api.github.com/repos/pocke/rubocop/milestones{/number}","notifications_url":"https://api.github.com/repos/pocke/rubocop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pocke/rubocop/labels{/name}","releases_url":"https://api.github.com/repos/pocke/rubocop/releases{/id}","deployments_url":"https://api.github.com/repos/pocke/rubocop/deployments","created_at":"2016-02-06T09:30:31Z","updated_at":"2016-02-06T09:30:35Z","pushed_at":"2017-12-02T10:48:27Z","git_url":"git://github.com/pocke/rubocop.git","ssh_url":"git@github.com:pocke/rubocop.git","clone_url":"https://github.com/pocke/rubocop.git","svn_url":"https://github.com/pocke/rubocop","homepage":"","size":18279,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bbatsov:master","ref":"master","sha":"4755801a5059f8fa32fbab2026c832d60b73f455","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars0.githubusercontent.com/u/103882?v=4","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://avatars0.githubusercontent.com/u/103882?v=4","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-12-01T23:43:58Z","pushed_at":"2017-12-02T10:22:44Z","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":18449,"stargazers_count":8326,"watchers_count":8326,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1555,"mirror_url":null,"archived":false,"open_issues_count":265,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1555,"open_issues":265,"watchers":8326,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175"},"html":{"href":"https://github.com/bbatsov/rubocop/pull/5175"},"issue":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/5175"},"comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/issues/5175/comments"},"review_comments":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175/comments"},"review_comment":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbatsov/rubocop/pulls/5175/commits"},"statuses":{"href":"https://api.github.com/repos/bbatsov/rubocop/statuses/d3c69b9405cd026962eb734d6bc118a73e1f059c"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":46,"deletions":5,"changed_files":3}}
{"actor":{"display_login":"pocke"}}