{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/350","labels_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/350/comments","events_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/350/events","html_url":"https://github.com/bbatsov/ruby-style-guide/pull/350","id":40196016,"number":350,"title":"Array() instead of conditional","user":{"login":"dimus","id":12124,"avatar_url":"https://avatars.githubusercontent.com/u/12124?v=3","gravatar_id":"","url":"https://api.github.com/users/dimus","html_url":"https://github.com/dimus","followers_url":"https://api.github.com/users/dimus/followers","following_url":"https://api.github.com/users/dimus/following{/other_user}","gists_url":"https://api.github.com/users/dimus/gists{/gist_id}","starred_url":"https://api.github.com/users/dimus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimus/subscriptions","organizations_url":"https://api.github.com/users/dimus/orgs","repos_url":"https://api.github.com/users/dimus/repos","events_url":"https://api.github.com/users/dimus/events{/privacy}","received_events_url":"https://api.github.com/users/dimus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-08-13T20:32:53Z","updated_at":"2015-05-02T23:40:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/pulls/350","html_url":"https://github.com/bbatsov/ruby-style-guide/pull/350","diff_url":"https://github.com/bbatsov/ruby-style-guide/pull/350.diff","patch_url":"https://github.com/bbatsov/ruby-style-guide/pull/350.patch"},"body":"This approach does not work well with hashes. Array() modifies\r\nhash making it a multi-dimentional array."},"comment":{"url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/comments/98418190","html_url":"https://github.com/bbatsov/ruby-style-guide/pull/350#issuecomment-98418190","issue_url":"https://api.github.com/repos/bbatsov/ruby-style-guide/issues/350","id":98418190,"user":{"login":"strand","id":509611,"avatar_url":"https://avatars.githubusercontent.com/u/509611?v=3","gravatar_id":"","url":"https://api.github.com/users/strand","html_url":"https://github.com/strand","followers_url":"https://api.github.com/users/strand/followers","following_url":"https://api.github.com/users/strand/following{/other_user}","gists_url":"https://api.github.com/users/strand/gists{/gist_id}","starred_url":"https://api.github.com/users/strand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strand/subscriptions","organizations_url":"https://api.github.com/users/strand/orgs","repos_url":"https://api.github.com/users/strand/repos","events_url":"https://api.github.com/users/strand/events{/privacy}","received_events_url":"https://api.github.com/users/strand/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T23:40:23Z","updated_at":"2015-05-02T23:40:23Z","body":"I think it would be clearer to phrase it like this:\r\n\r\n> Note: this approach does not work if a variable is either a hash or an array of hashes, as Array() converts the hash to an array before wrapping it in an array, thus creating an array of arrays of key-value pairs."}}