{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/1846","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/1846/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/1846/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/1846/events","html_url":"https://github.com/nodejs/io.js/pull/1846","id":82930197,"number":1846,"title":"fix a few wrong comments in Readable stream","user":{"login":"dominictarr","id":259374,"avatar_url":"https://avatars.githubusercontent.com/u/259374?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictarr","html_url":"https://github.com/dominictarr","followers_url":"https://api.github.com/users/dominictarr/followers","following_url":"https://api.github.com/users/dominictarr/following{/other_user}","gists_url":"https://api.github.com/users/dominictarr/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictarr/subscriptions","organizations_url":"https://api.github.com/users/dominictarr/orgs","repos_url":"https://api.github.com/users/dominictarr/repos","events_url":"https://api.github.com/users/dominictarr/events{/privacy}","received_events_url":"https://api.github.com/users/dominictarr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/stream","name":"stream","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-30T22:23:02Z","updated_at":"2015-06-02T11:03:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/io.js/pulls/1846","html_url":"https://github.com/nodejs/io.js/pull/1846","diff_url":"https://github.com/nodejs/io.js/pull/1846.diff","patch_url":"https://github.com/nodejs/io.js/pull/1846.patch"},"body":"I was reading the code and noticed that some of the comments where clearly wrong.\r\nThe pipe function now resembles the classic 0.8 era pipe function (lib/stream.js) with data, end, pause and resume. The readable event and read() are not used in pipe at all, so the comments that say pause/resume is legacy are misleading.\r\n\r\nAlso I removed `stream.ranOut`, because it was never mentioned (anywhere in iojs or in the documentation) it's just always false, so mostly surely no dependant code ever checks it, and if it does it will still be falsey, this can probably be considered a patch, but it wasn't prefixed with _ so it _may_ be considered a public api by some.\r\n\r\nThere where some other comments which seemed dubious, but not as obviously so,\r\nfor example https://github.com/nodejs/io.js/blob/master/lib/_stream_readable.js#L412-L417 describes the user listening on `'readable'` and calling `read()` but they generally they should just use `pipe()` instead - however, it doesn't seem as clear cut as the above so I didn't make that commit."},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/107916453","html_url":"https://github.com/nodejs/io.js/pull/1846#issuecomment-107916453","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/1846","id":107916453,"user":{"login":"dominictarr","id":259374,"avatar_url":"https://avatars.githubusercontent.com/u/259374?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictarr","html_url":"https://github.com/dominictarr","followers_url":"https://api.github.com/users/dominictarr/followers","following_url":"https://api.github.com/users/dominictarr/following{/other_user}","gists_url":"https://api.github.com/users/dominictarr/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictarr/subscriptions","organizations_url":"https://api.github.com/users/dominictarr/orgs","repos_url":"https://api.github.com/users/dominictarr/repos","events_url":"https://api.github.com/users/dominictarr/events{/privacy}","received_events_url":"https://api.github.com/users/dominictarr/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T11:03:31Z","updated_at":"2015-06-02T11:03:31Z","body":"`ranOut` is always false, it never gets changed, so there isn't any information that they could be getting from it. I'd be okay with changing my pr to just delete the comment about it though, since pipe doesn't use `'readable'` events anymore anyway."}}