{"action":"created","issue":{"url":"https://api.github.com/repos/rack/rack/issues/1095","repository_url":"https://api.github.com/repos/rack/rack","labels_url":"https://api.github.com/repos/rack/rack/issues/1095/labels{/name}","comments_url":"https://api.github.com/repos/rack/rack/issues/1095/comments","events_url":"https://api.github.com/repos/rack/rack/issues/1095/events","html_url":"https://github.com/rack/rack/issues/1095","id":164943257,"number":1095,"title":"Body inconsistency: call, Response, MockResponse","user":{"login":"mattdipasquale","id":17276,"avatar_url":"https://avatars.githubusercontent.com/u/17276?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdipasquale","html_url":"https://github.com/mattdipasquale","followers_url":"https://api.github.com/users/mattdipasquale/followers","following_url":"https://api.github.com/users/mattdipasquale/following{/other_user}","gists_url":"https://api.github.com/users/mattdipasquale/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdipasquale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdipasquale/subscriptions","organizations_url":"https://api.github.com/users/mattdipasquale/orgs","repos_url":"https://api.github.com/users/mattdipasquale/repos","events_url":"https://api.github.com/users/mattdipasquale/events{/privacy}","received_events_url":"https://api.github.com/users/mattdipasquale/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-11T21:51:34Z","updated_at":"2016-07-13T21:59:57Z","closed_at":null,"body":"1. `call`\r\n\r\n    \"The Body itself should not be an instance of String.\" — [Rack interface specification](http://www.rubydoc.info/github/rack/rack/master/file/SPEC#The_Body)\r\n\r\n    If it is, an exception is raised.\r\n\r\n    ```ruby\r\n    #<NoMethodError: undefined method 'each' for \"Hello, World!\":String>\r\n    ```\r\n\r\n2. `Response`\r\n\r\n    If the body's a string, it's converted to an array and no exception is raised.\r\n\r\n    ```ruby\r\n    response = Rack::Response.new(\"Hello, World!\", 200, {})\r\n    # => . . . @body=[\"Hello, World!\"] . . .\r\n    ```\r\n\r\n    `Response#body` returns the body as is.\r\n\r\n    ```ruby\r\n    response.body\r\n    # => [\"Hello, World!\"]\r\n    ```\r\n\r\n3. `MockResponse`\r\n\r\n    Like `Response`, if the body's a string, it's converted to an array and no exception is raised.\r\n\r\n    ```ruby\r\n    mock_response = Rack::MockResponse.new(200, {}, \"Hello, World!\")\r\n    # => . . . @body=[\"Hello, World!\"] . . .\r\n   ```\r\n\r\n    Unlike `Response#body`, `MockResponse#body` converts the body from an array to a string.\r\n\r\n    ```ruby\r\n    mock_response.body\r\n    # => \"Hello, World!\"\r\n    ```"},"comment":{"url":"https://api.github.com/repos/rack/rack/issues/comments/232499691","html_url":"https://github.com/rack/rack/issues/1095#issuecomment-232499691","issue_url":"https://api.github.com/repos/rack/rack/issues/1095","id":232499691,"user":{"login":"mattdipasquale","id":17276,"avatar_url":"https://avatars.githubusercontent.com/u/17276?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdipasquale","html_url":"https://github.com/mattdipasquale","followers_url":"https://api.github.com/users/mattdipasquale/followers","following_url":"https://api.github.com/users/mattdipasquale/following{/other_user}","gists_url":"https://api.github.com/users/mattdipasquale/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdipasquale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdipasquale/subscriptions","organizations_url":"https://api.github.com/users/mattdipasquale/orgs","repos_url":"https://api.github.com/users/mattdipasquale/repos","events_url":"https://api.github.com/users/mattdipasquale/events{/privacy}","received_events_url":"https://api.github.com/users/mattdipasquale/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T21:59:57Z","updated_at":"2016-07-13T21:59:57Z","body":"Related: #1094"}}
{"actor":{"display_login":"mattdipasquale"}}