{"action":"created","issue":{"url":"https://api.github.com/repos/mbj/mutant/issues/421","labels_url":"https://api.github.com/repos/mbj/mutant/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/mbj/mutant/issues/421/comments","events_url":"https://api.github.com/repos/mbj/mutant/issues/421/events","html_url":"https://github.com/mbj/mutant/issues/421","id":101941902,"number":421,"title":"Blind spot on the rhs of op assigns","user":{"login":"tjchambers","id":103654,"avatar_url":"https://avatars.githubusercontent.com/u/103654?v=3","gravatar_id":"","url":"https://api.github.com/users/tjchambers","html_url":"https://github.com/tjchambers","followers_url":"https://api.github.com/users/tjchambers/followers","following_url":"https://api.github.com/users/tjchambers/following{/other_user}","gists_url":"https://api.github.com/users/tjchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/tjchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjchambers/subscriptions","organizations_url":"https://api.github.com/users/tjchambers/orgs","repos_url":"https://api.github.com/users/tjchambers/repos","events_url":"https://api.github.com/users/tjchambers/events{/privacy}","received_events_url":"https://api.github.com/users/tjchambers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-19T16:35:21Z","updated_at":"2015-08-19T22:44:00Z","closed_at":null,"body":"I am seeing this mutation of my code (please no chiding for use of class variable - I am working through that):\r\n\r\n```\r\n def self.background_user\r\n-  @@bgu ||= self.find_by(email: BACKGROUND_USER)\r\n+  @@bgu__mutant__ ||= self.find_by(email: BACKGROUND_USER)\r\n end\r\n```\r\n\r\nThat is the only mutation left alive for this method.\r\n\r\nFor a separate method I see (and expected) a mutation of \"self.\" to drop it as unnecessary:\r\n\r\n```\r\n def self.current\r\n   (Thread.current[:user] || if respond_to?(:current_user)\r\n     current_user\r\n-  end) || self.background_user\r\n+  end) || background_user\r\n end\r\n```\r\n\r\nI was expecting a similar mutation of the former code but didn't see one. What makes these two examples different? I expected to see:\r\n\r\n```\r\n def self.background_user\r\n-  @@bgu ||= self.find_by(email: BACKGROUND_USER)\r\n+  @@bgu ||= find_by(email: BACKGROUND_USER)\r\n end\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mbj/mutant/issues/comments/132814152","html_url":"https://github.com/mbj/mutant/issues/421#issuecomment-132814152","issue_url":"https://api.github.com/repos/mbj/mutant/issues/421","id":132814152,"user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T22:44:00Z","updated_at":"2015-08-19T22:44:00Z","body":"> Opened a PR if you want to take a look\r\n\r\nThx. But I'm too busy for today and probably the next days. Sorry for that."}}