scala/scala — pull request #1960 by ViniciusMiana (2013-01-24 00:25:18+00:00)
Title: SI-6583 changed private method remove to be tail recursive.

Operations += and -= on mutable.ListMap rely on the private method remove to perform. This method was implemented using recursion, but it was not tail recursive. When the ListMap got too big the += caused a StackOverflowError.

This PR replaces https://github.com/scala/scala/pull/1925, following Adrian's advice to include it in the 2.10.x.

review by @phaller