{"action":"created","comment":{"url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments/28468907","id":28468907,"diff_hunk":"@@ -37,6 +44,17 @@ def matches?(given_proc, negative_expectation=false, &block)\n           @eval_block = false\n           @eval_block_passed = false\n \n+          if warning_about_bare_error && !negative_expectation\n+            RSpec.warning(\"Using the `raise_error` matcher without providing a specific \" \\\n+                          \"error or message risks false positives, since `raise_error` \" \\\n+                          \"will match when Ruby raises a `NoMethodError`, `NameError` or \" \\\n+                          \"`ArgumentError`, potentially allowing the expectation to pass \" \\\n+                          \"without even executing the method you are intending to call. \" \\\n+                          \"Instead consider providing a specific error class or message. \" \\\n+                          \"This message can be supressed by setting: \" \\\n+                          \"`RSpec::Expectations.configuration.warn_about_false_positives = false`\")\n+          end","path":"lib/rspec/matchers/built_in/raise_error.rb","position":null,"original_position":39,"commit_id":"b13ef7b712a5b8487f29f9862bfeaba5b7512cce","original_commit_id":"f4a9dc682929220f9c30a1003c5b4f5698baeddf","user":{"login":"JonRowe","id":162976,"avatar_url":"https://avatars.githubusercontent.com/u/162976?v=3","gravatar_id":"","url":"https://api.github.com/users/JonRowe","html_url":"https://github.com/JonRowe","followers_url":"https://api.github.com/users/JonRowe/followers","following_url":"https://api.github.com/users/JonRowe/following{/other_user}","gists_url":"https://api.github.com/users/JonRowe/gists{/gist_id}","starred_url":"https://api.github.com/users/JonRowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonRowe/subscriptions","organizations_url":"https://api.github.com/users/JonRowe/orgs","repos_url":"https://api.github.com/users/JonRowe/repos","events_url":"https://api.github.com/users/JonRowe/events{/privacy}","received_events_url":"https://api.github.com/users/JonRowe/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-04-15T22:19:21Z","updated_at":"2015-04-15T22:19:21Z","html_url":"https://github.com/rspec/rspec-expectations/pull/768#discussion_r28468907","pull_request_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768","_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments/28468907"},"html":{"href":"https://github.com/rspec/rspec-expectations/pull/768#discussion_r28468907"},"pull_request":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768"}}},"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768","id":33113123,"html_url":"https://github.com/rspec/rspec-expectations/pull/768","diff_url":"https://github.com/rspec/rspec-expectations/pull/768.diff","patch_url":"https://github.com/rspec/rspec-expectations/pull/768.patch","issue_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/768","number":768,"state":"open","locked":false,"title":"Warn about bare `raise_error`","user":{"login":"JonRowe","id":162976,"avatar_url":"https://avatars.githubusercontent.com/u/162976?v=3","gravatar_id":"","url":"https://api.github.com/users/JonRowe","html_url":"https://github.com/JonRowe","followers_url":"https://api.github.com/users/JonRowe/followers","following_url":"https://api.github.com/users/JonRowe/following{/other_user}","gists_url":"https://api.github.com/users/JonRowe/gists{/gist_id}","starred_url":"https://api.github.com/users/JonRowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonRowe/subscriptions","organizations_url":"https://api.github.com/users/JonRowe/orgs","repos_url":"https://api.github.com/users/JonRowe/repos","events_url":"https://api.github.com/users/JonRowe/events{/privacy}","received_events_url":"https://api.github.com/users/JonRowe/received_events","type":"User","site_admin":false},"body":"Issues a warning (which can be supressed) when using a bare `raise_error` call. Fixes #655.","created_at":"2015-04-12T01:29:37Z","updated_at":"2015-04-15T22:19:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29531e21b3b9ce4ba5250cfca539253b30b6a864","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768/commits","review_comments_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768/comments","review_comment_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/768/comments","statuses_url":"https://api.github.com/repos/rspec/rspec-expectations/statuses/b13ef7b712a5b8487f29f9862bfeaba5b7512cce","head":{"label":"rspec:warn_about_bare_raise_error","ref":"warn_about_bare_raise_error","sha":"b13ef7b712a5b8487f29f9862bfeaba5b7512cce","user":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"repo":{"id":238986,"name":"rspec-expectations","full_name":"rspec/rspec-expectations","owner":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rspec/rspec-expectations","description":"Provides a readable API to express expected outcomes of a code example","fork":false,"url":"https://api.github.com/repos/rspec/rspec-expectations","forks_url":"https://api.github.com/repos/rspec/rspec-expectations/forks","keys_url":"https://api.github.com/repos/rspec/rspec-expectations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-expectations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-expectations/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-expectations/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-expectations/events","assignees_url":"https://api.github.com/repos/rspec/rspec-expectations/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-expectations/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-expectations/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-expectations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-expectations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-expectations/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-expectations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-expectations/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-expectations/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-expectations/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-expectations/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-expectations/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-expectations/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-expectations/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-expectations/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-expectations/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-expectations/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-expectations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-expectations/merges","archive_url":"https://api.github.com/repos/rspec/rspec-expectations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-expectations/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-expectations/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-expectations/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-expectations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-expectations/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-expectations/releases{/id}","created_at":"2009-06-29T15:58:17Z","updated_at":"2015-04-15T16:46:00Z","pushed_at":"2015-04-15T22:19:12Z","git_url":"git://github.com/rspec/rspec-expectations.git","ssh_url":"git@github.com:rspec/rspec-expectations.git","clone_url":"https://github.com/rspec/rspec-expectations.git","svn_url":"https://github.com/rspec/rspec-expectations","homepage":"http://relishapp.com/rspec/rspec-expectations","size":9753,"stargazers_count":615,"watchers_count":615,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":26,"forks":203,"open_issues":26,"watchers":615,"default_branch":"master"}},"base":{"label":"rspec:master","ref":"master","sha":"a75fe7bfc48788c724e51fb6e1b4581b76376e19","user":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"repo":{"id":238986,"name":"rspec-expectations","full_name":"rspec/rspec-expectations","owner":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rspec/rspec-expectations","description":"Provides a readable API to express expected outcomes of a code example","fork":false,"url":"https://api.github.com/repos/rspec/rspec-expectations","forks_url":"https://api.github.com/repos/rspec/rspec-expectations/forks","keys_url":"https://api.github.com/repos/rspec/rspec-expectations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-expectations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-expectations/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-expectations/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-expectations/events","assignees_url":"https://api.github.com/repos/rspec/rspec-expectations/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-expectations/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-expectations/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-expectations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-expectations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-expectations/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-expectations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-expectations/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-expectations/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-expectations/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-expectations/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-expectations/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-expectations/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-expectations/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-expectations/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-expectations/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-expectations/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-expectations/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-expectations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-expectations/merges","archive_url":"https://api.github.com/repos/rspec/rspec-expectations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-expectations/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-expectations/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-expectations/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-expectations/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-expectations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-expectations/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-expectations/releases{/id}","created_at":"2009-06-29T15:58:17Z","updated_at":"2015-04-15T16:46:00Z","pushed_at":"2015-04-15T22:19:12Z","git_url":"git://github.com/rspec/rspec-expectations.git","ssh_url":"git@github.com:rspec/rspec-expectations.git","clone_url":"https://github.com/rspec/rspec-expectations.git","svn_url":"https://github.com/rspec/rspec-expectations","homepage":"http://relishapp.com/rspec/rspec-expectations","size":9753,"stargazers_count":615,"watchers_count":615,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":26,"forks":203,"open_issues":26,"watchers":615,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768"},"html":{"href":"https://github.com/rspec/rspec-expectations/pull/768"},"issue":{"href":"https://api.github.com/repos/rspec/rspec-expectations/issues/768"},"comments":{"href":"https://api.github.com/repos/rspec/rspec-expectations/issues/768/comments"},"review_comments":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768/comments"},"review_comment":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rspec/rspec-expectations/pulls/768/commits"},"statuses":{"href":"https://api.github.com/repos/rspec/rspec-expectations/statuses/b13ef7b712a5b8487f29f9862bfeaba5b7512cce"}}}}