{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-mocks/issues/974","labels_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/974/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/974/comments","events_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/974/events","html_url":"https://github.com/rspec/rspec-mocks/pull/974","id":88153832,"number":974,"title":"A fix for #972","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-14T09:17:39Z","updated_at":"2015-06-15T21:01:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/974","html_url":"https://github.com/rspec/rspec-mocks/pull/974","diff_url":"https://github.com/rspec/rspec-mocks/pull/974.diff","patch_url":"https://github.com/rspec/rspec-mocks/pull/974.patch"},"body":"It seemed to me that if the problem is creating superclass proxies, then we could just add a method and put a flag in to the constructors to fix this. The current fix is a bit shonky, but demonstrates the solution.\r\n\r\nI have some questions/thoughts:\r\n\r\n1. Perhaps, this behaviour change should be extracted out in to an object, as opposed to a conditional. We'd inject a callbacks collaborator into the proxies which they would then invoke\r\n2. Perhaps this should be flag on proxy_for instead of adding a new method?\r\n3. I think the verifying class proxy is the only place we need to put the flag, but is that correct?\r\n\r\nThis fix is *really simple*, but I'm not sure it's architecturally brilliant. Thoughts?"},"comment":{"url":"https://api.github.com/repos/rspec/rspec-mocks/issues/comments/112211088","html_url":"https://github.com/rspec/rspec-mocks/pull/974#issuecomment-112211088","issue_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/974","id":112211088,"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},"created_at":"2015-06-15T21:01:51Z","updated_at":"2015-06-15T21:01:51Z","body":"@myronmarston given this represents a real bug fix, I'd like to see it merged. I agree that aiming at reducing complexity is a good idea, but I don't think it should come at the cost of fixes. This also has behaviour that should be preserved after any refactorings.\r\n\r\nRegarding the strategy pattern situation: I'd rather not introduce a conditional if it can be avoided, I find conditionals breed like complexity. I'm happy to store individual instances of both strategy objects so that we don't have to make new ones each time."}}