Answered RxJs V2.0.20327 Beta CompositeDisposable bug

  • Saturday, May 12, 2012 11:23 AM
     
      Has Code

    CompositeDisposable.remove() incorrectly decrements length even if nothing was removed.  This unit test fails on the 2nd assertion because length is -1:

        QUnit.test("CompositeDisposable.remove bug", 2, function () {
            var c = new Rx.CompositeDisposable();
            QUnit.strictEqual(c.length, 0, "Starts off with 0 length");
            c.remove(new Rx.Disposable()); // remove some non-existent disposable
            QUnit.strictEqual(c.length, 0, "Should still be 0 length");
        });
    

    • Changed Type bman654 Friday, May 18, 2012 3:02 PM
    •  

All Replies

  • Friday, May 18, 2012 3:15 AM
     
     Answered

    So noted and will be fixed in the next release.

    Matt

    • Marked As Answer by bman654 Friday, May 18, 2012 3:02 PM
    •