{"action":"opened","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/2135","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2135/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2135/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/2135/events","html_url":"https://github.com/bbatsov/rubocop/issues/2135","id":100268058,"number":2135,"title":"SymbolProc may break code","user":{"login":"klippx","id":2785359,"avatar_url":"https://avatars.githubusercontent.com/u/2785359?v=3","gravatar_id":"","url":"https://api.github.com/users/klippx","html_url":"https://github.com/klippx","followers_url":"https://api.github.com/users/klippx/followers","following_url":"https://api.github.com/users/klippx/following{/other_user}","gists_url":"https://api.github.com/users/klippx/gists{/gist_id}","starred_url":"https://api.github.com/users/klippx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klippx/subscriptions","organizations_url":"https://api.github.com/users/klippx/orgs","repos_url":"https://api.github.com/users/klippx/repos","events_url":"https://api.github.com/users/klippx/events{/privacy}","received_events_url":"https://api.github.com/users/klippx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-11T09:24:16Z","updated_at":"2015-08-11T09:24:16Z","closed_at":null,"body":"I have a piece of controller code like this:\r\n```ruby\r\n  def destroy\r\n    super([:pharmaceut]) do |substance|\r\n      substance.destroyable?\r\n    end\r\n  end\r\n````\r\nRubocop wants to autocorrect this to:\r\n```\r\n> rubocop -a app/controllers/api/substances_controller.rb\r\nInspecting 1 file\r\nE\r\n\r\nOffenses:\r\n\r\napp/controllers/api/substances_controller.rb:20:5: C: [Corrected] Pass &:destroyable? as an argument to  instead of a block.\r\n    super([:pharmaceut]) do |substance|\r\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\napp/controllers/api/substances_controller.rb:20:25: E: unexpected token tLPAREN2\r\n    super([:pharmaceut])(&:destroyable?)\r\n                        ^\r\napp/controllers/api/substances_controller.rb:42:1: E: unexpected token $end\r\n\r\n1 file inspected, 3 offenses detected, 1 offense corrected\r\n````\r\n\r\nRubocop even detects two Errors - all due to the code it generated on its own.\r\n\r\nThe final result:\r\n\r\n```ruby\r\n  def destroy\r\n    super([:pharmaceut])(&:destroyable?)\r\n  end\r\n````\r\n\r\nAs you can see this is clearly erroneous syntax. \r\n\r\nVersion\r\n````\r\n> rubocop -v\r\nwarning: parser/current is loading parser/ruby21, which recognizes\r\nwarning: 2.1.6-compliant syntax, but you are running 2.1.5.\r\nwarning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.\r\n0.33.0\r\n````"}}