{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2195","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2195/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2195/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2195/events","html_url":"https://github.com/ReactiveX/rxjs/pull/2195","id":195595778,"number":2195,"title":"fix(buffer): subscribe to source and closingNotifier in proper order","user":{"login":"Podlas29","id":7916523,"avatar_url":"https://avatars.githubusercontent.com/u/7916523?v=3","gravatar_id":"","url":"https://api.github.com/users/Podlas29","html_url":"https://github.com/Podlas29","followers_url":"https://api.github.com/users/Podlas29/followers","following_url":"https://api.github.com/users/Podlas29/following{/other_user}","gists_url":"https://api.github.com/users/Podlas29/gists{/gist_id}","starred_url":"https://api.github.com/users/Podlas29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Podlas29/subscriptions","organizations_url":"https://api.github.com/users/Podlas29/orgs","repos_url":"https://api.github.com/users/Podlas29/repos","events_url":"https://api.github.com/users/Podlas29/events{/privacy}","received_events_url":"https://api.github.com/users/Podlas29/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-14T17:34:27Z","updated_at":"2016-12-15T18:57:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/rxjs/pulls/2195","html_url":"https://github.com/ReactiveX/rxjs/pull/2195","diff_url":"https://github.com/ReactiveX/rxjs/pull/2195.diff","patch_url":"https://github.com/ReactiveX/rxjs/pull/2195.patch"},"body":"<!--\r\nThank you very much for your pull request!\r\n\r\nIf your PR is the addition of a new operator, please make sure all these boxes are ticked with an x:\r\n\r\n- [ ] Add the operator to Rx\r\n- [ ] It must have a `-spec.ts` tests file covering the canonical corner cases, with marble diagram tests\r\n- [ ] If possible, write a `asDiagram` test case too, for PNG diagram generation purposes\r\n- [ ] The spec file should have a type definition test at the end of the spec to verify type definition for various use cases\r\n- [ ] The operator must be documented in JSDoc style in the implementation file, including also the PNG marble diagram image\r\n- [ ] The operator should be listed in `doc/operators.md` in a category of operators\r\n- [ ] It should also be inserted in the operator decision tree file `doc/decision-tree-widget/tree.yml`\r\n- [ ] You may need to update `MIGRATION.md` if the operator differs from the corresponding one in RxJS v4\r\n-->\r\n\r\n**Description:**\r\n\r\nIn buffer operator subscribe to source observable first, so that when\r\nclosingNotifier emits value, all source values emited before land in buffer\r\n\r\n**Related issue (if exists):**\r\n\r\nCloses #1610"},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/267410468","html_url":"https://github.com/ReactiveX/rxjs/pull/2195#issuecomment-267410468","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/2195","id":267410468,"user":{"login":"Podlas29","id":7916523,"avatar_url":"https://avatars.githubusercontent.com/u/7916523?v=3","gravatar_id":"","url":"https://api.github.com/users/Podlas29","html_url":"https://github.com/Podlas29","followers_url":"https://api.github.com/users/Podlas29/followers","following_url":"https://api.github.com/users/Podlas29/following{/other_user}","gists_url":"https://api.github.com/users/Podlas29/gists{/gist_id}","starred_url":"https://api.github.com/users/Podlas29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Podlas29/subscriptions","organizations_url":"https://api.github.com/users/Podlas29/orgs","repos_url":"https://api.github.com/users/Podlas29/repos","events_url":"https://api.github.com/users/Podlas29/events{/privacy}","received_events_url":"https://api.github.com/users/Podlas29/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T18:57:23Z","updated_at":"2016-12-15T18:57:23Z","body":"In RxJS 4\r\n```javascript\r\nconst Observable = Rx.Observable;\r\n\r\nconst xs = Observable.from([0,1,2,3,4,5,6]);\r\n\r\nxs.buffer(xs.filter(x => x % 2 === 0))\r\n\t.subscribe(x => console.log(x));\r\n```\r\nresults in \r\n`[0]`\r\n`[1, 2]`\r\n`[3, 4]`\r\n\r\nAfter my change rxjs 5 behaves same (as seen in my unit test).\r\nDo you have any cases where behaviour is different?"}}
{"actor":{"display_login":"Podlas29"}}