{"action":"created","comment":{"url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments/29111540","id":29111540,"diff_hunk":"@@ -176,6 +176,7 @@ def and_throw(*args)\n       def and_yield(*args, &block)\n         raise_already_invoked_error_if_necessary(__method__)\n         yield @eval_context = Object.new if block\n+        @args_to_yield ||= []","path":"lib/rspec/mocks/message_expectation.rb","position":4,"original_position":4,"commit_id":"9f68a466b23319609a43591081bc8560ef28e28e","original_commit_id":"9f68a466b23319609a43591081bc8560ef28e28e","user":{"login":"myronmarston","id":49391,"avatar_url":"https://avatars.githubusercontent.com/u/49391?v=3","gravatar_id":"","url":"https://api.github.com/users/myronmarston","html_url":"https://github.com/myronmarston","followers_url":"https://api.github.com/users/myronmarston/followers","following_url":"https://api.github.com/users/myronmarston/following{/other_user}","gists_url":"https://api.github.com/users/myronmarston/gists{/gist_id}","starred_url":"https://api.github.com/users/myronmarston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myronmarston/subscriptions","organizations_url":"https://api.github.com/users/myronmarston/orgs","repos_url":"https://api.github.com/users/myronmarston/repos","events_url":"https://api.github.com/users/myronmarston/events{/privacy}","received_events_url":"https://api.github.com/users/myronmarston/received_events","type":"User","site_admin":false},"body":"Given that it's common to refactor from this to initializing it in `initialize`, it might be worth leaving a comment explaining the reason we're not doing that here so we don't accidentally refactor back.","created_at":"2015-04-26T16:56:35Z","updated_at":"2015-04-26T16:56:35Z","html_url":"https://github.com/rspec/rspec-mocks/pull/936#discussion_r29111540","pull_request_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936","_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments/29111540"},"html":{"href":"https://github.com/rspec/rspec-mocks/pull/936#discussion_r29111540"},"pull_request":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936"}}},"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936","id":34121473,"html_url":"https://github.com/rspec/rspec-mocks/pull/936","diff_url":"https://github.com/rspec/rspec-mocks/pull/936.diff","patch_url":"https://github.com/rspec/rspec-mocks/pull/936.patch","issue_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/936","number":936,"state":"open","locked":false,"title":"Benchmark and optimise allocations","user":{"login":"samphippen","id":96662,"avatar_url":"https://avatars.githubusercontent.com/u/96662?v=3","gravatar_id":"","url":"https://api.github.com/users/samphippen","html_url":"https://github.com/samphippen","followers_url":"https://api.github.com/users/samphippen/followers","following_url":"https://api.github.com/users/samphippen/following{/other_user}","gists_url":"https://api.github.com/users/samphippen/gists{/gist_id}","starred_url":"https://api.github.com/users/samphippen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samphippen/subscriptions","organizations_url":"https://api.github.com/users/samphippen/orgs","repos_url":"https://api.github.com/users/samphippen/repos","events_url":"https://api.github.com/users/samphippen/events{/privacy}","received_events_url":"https://api.github.com/users/samphippen/received_events","type":"User","site_admin":false},"body":"This was allocating linear hashes per mock. Now it allocates at most\r\none in the execution of the whole test suite, the default hash is a\r\nconstant.\r\n\r\nWIP, but here's an initial optimisation. I'll do as many as I can and get this cleaned up by the end of next weekend.","created_at":"2015-04-26T11:08:25Z","updated_at":"2015-04-26T16:56:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a72c2d3fb343d1d714dc8b841c8f647357c1cdd5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936/commits","review_comments_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936/comments","review_comment_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/936/comments","statuses_url":"https://api.github.com/repos/rspec/rspec-mocks/statuses/9f68a466b23319609a43591081bc8560ef28e28e","head":{"label":"rspec:allocation-optimsiations","ref":"allocation-optimsiations","sha":"9f68a466b23319609a43591081bc8560ef28e28e","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":238983,"name":"rspec-mocks","full_name":"rspec/rspec-mocks","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-mocks","description":"RSpec's 'test double' framework, with support for stubbing and mocking","fork":false,"url":"https://api.github.com/repos/rspec/rspec-mocks","forks_url":"https://api.github.com/repos/rspec/rspec-mocks/forks","keys_url":"https://api.github.com/repos/rspec/rspec-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-mocks/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-mocks/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-mocks/events","assignees_url":"https://api.github.com/repos/rspec/rspec-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-mocks/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-mocks/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-mocks/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-mocks/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-mocks/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-mocks/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-mocks/merges","archive_url":"https://api.github.com/repos/rspec/rspec-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-mocks/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-mocks/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-mocks/releases{/id}","created_at":"2009-06-29T15:56:06Z","updated_at":"2015-04-23T12:27:12Z","pushed_at":"2015-04-26T12:14:51Z","git_url":"git://github.com/rspec/rspec-mocks.git","ssh_url":"git@github.com:rspec/rspec-mocks.git","clone_url":"https://github.com/rspec/rspec-mocks.git","svn_url":"https://github.com/rspec/rspec-mocks","homepage":"http://relishapp.com/rspec/rspec-mocks","size":13686,"stargazers_count":532,"watchers_count":532,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"open_issues_count":16,"forks":193,"open_issues":16,"watchers":532,"default_branch":"master"}},"base":{"label":"rspec:master","ref":"master","sha":"18277e260e749ddf2daec617a39f2f514da1ec10","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":238983,"name":"rspec-mocks","full_name":"rspec/rspec-mocks","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-mocks","description":"RSpec's 'test double' framework, with support for stubbing and mocking","fork":false,"url":"https://api.github.com/repos/rspec/rspec-mocks","forks_url":"https://api.github.com/repos/rspec/rspec-mocks/forks","keys_url":"https://api.github.com/repos/rspec/rspec-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-mocks/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-mocks/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-mocks/events","assignees_url":"https://api.github.com/repos/rspec/rspec-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-mocks/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-mocks/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-mocks/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-mocks/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-mocks/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-mocks/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-mocks/merges","archive_url":"https://api.github.com/repos/rspec/rspec-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-mocks/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-mocks/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-mocks/releases{/id}","created_at":"2009-06-29T15:56:06Z","updated_at":"2015-04-23T12:27:12Z","pushed_at":"2015-04-26T12:14:51Z","git_url":"git://github.com/rspec/rspec-mocks.git","ssh_url":"git@github.com:rspec/rspec-mocks.git","clone_url":"https://github.com/rspec/rspec-mocks.git","svn_url":"https://github.com/rspec/rspec-mocks","homepage":"http://relishapp.com/rspec/rspec-mocks","size":13686,"stargazers_count":532,"watchers_count":532,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"open_issues_count":16,"forks":193,"open_issues":16,"watchers":532,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936"},"html":{"href":"https://github.com/rspec/rspec-mocks/pull/936"},"issue":{"href":"https://api.github.com/repos/rspec/rspec-mocks/issues/936"},"comments":{"href":"https://api.github.com/repos/rspec/rspec-mocks/issues/936/comments"},"review_comments":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936/comments"},"review_comment":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/936/commits"},"statuses":{"href":"https://api.github.com/repos/rspec/rspec-mocks/statuses/9f68a466b23319609a43591081bc8560ef28e28e"}}}}