{"action":"opened","issue":{"url":"https://api.github.com/repos/makandra/consul/issues/21","labels_url":"https://api.github.com/repos/makandra/consul/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/makandra/consul/issues/21/comments","events_url":"https://api.github.com/repos/makandra/consul/issues/21/events","html_url":"https://github.com/makandra/consul/issues/21","id":58205904,"number":21,"title":"Misleading error message when arguments (for context-powers) are missing","user":{"login":"judithroth","id":9654673,"avatar_url":"https://avatars.githubusercontent.com/u/9654673?v=3","gravatar_id":"","url":"https://api.github.com/users/judithroth","html_url":"https://github.com/judithroth","followers_url":"https://api.github.com/users/judithroth/followers","following_url":"https://api.github.com/users/judithroth/following{/other_user}","gists_url":"https://api.github.com/users/judithroth/gists{/gist_id}","starred_url":"https://api.github.com/users/judithroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judithroth/subscriptions","organizations_url":"https://api.github.com/users/judithroth/orgs","repos_url":"https://api.github.com/users/judithroth/repos","events_url":"https://api.github.com/users/judithroth/events{/privacy}","received_events_url":"https://api.github.com/users/judithroth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-19T13:09:07Z","updated_at":"2015-02-19T13:09:07Z","closed_at":null,"body":"Say we have the following power:\r\n```\r\npower :client_notes do |client|\r\n  # ...\r\nend\r\n```\r\n\r\nWhen calling \r\n```\r\nPower.current.client_note?(note)\r\n```\r\nwithout giving the context `client` (e.g. `Power.current.client_note?(client, note)`), the error:\r\n\r\n```\r\nwrong number of arguments (0 for 1)\r\n```\r\nis thrown, although it needs two arguments instead of one.\r\n\r\n#### Assumption\r\nSince the power query methods are dynamically defined, this might be due to a block taking two parameters. This block does not complain when less parameters are given, however, it probably should. Because it currently does not complain, the actual `0 for 1` arguments error occurs later, leading the wrong direction."}}