scala/scala — pull request #3925 by ruippeixotog (2014-08-10 19:51:14+00:00)
Title: SI-8627 Override filterNot in Stream

Fixes a bug in which `Stream#filterNot` performs an eager evaluation of
the `Stream` it is called on. Also adds an additional unit test that
exposes the bug.

Previously, commit 7a6905dc15 fixed this method, but commit 3059e3a0c03
broke it again. In my opinion, `Stream` should not rely on the fact
that `TraversableLike`’s implementation of `filterNot` uses `filter`,
as it is not mandatory in the method’s contract. Instead, the method
should be overriden in `Stream` - that way, `Stream` will be more
resilient to changes in its underlying traits.