Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rx.NET/Source/src/System.Reactive/Linq/Observable/Zip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public override void OnError(Exception error)

public override void OnCompleted()
{
Dispose();
base.Dispose(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small comment why the base (and not the own) method is called could be helpful for future readers.


lock (_gate)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4462,13 +4462,17 @@ public void Zip2WithImmediateReturn()
[Fact]
public void Zip3WithImmediateReturn()
{
Observable.Zip<Unit, Unit, Unit, Unit>(
Observable.Return(Unit.Default),
Observable.Return(Unit.Default),
Observable.Return(Unit.Default),
(_, __, ___) => Unit.Default
int result = 0;

Observable.Zip<int, int, int, int>(
Observable.Return(1),
Observable.Return(2),
Observable.Return(4),
(a, b, c) => a + b + c
)
.Subscribe(_ => { });
.Subscribe(v => result = v);

Assert.Equal(7, result);
}

[Fact]
Expand Down