D-Programming-Language/phobos — pull request #1020 by quickfur (2012-12-20 21:47:54+00:00)
Title: Fix transient and forward range bugs in joiner with separator

This pull request concerns the variant of joiner that takes a separator (the other pull request is for the one without separator).

The joiner is revamped to work correctly with transient ranges (not assume that .front remains valid after calling .popFront).

It is also fixed to always iterate on a .save'd copy of subranges, when forward ranges are involved, because the outer range's .save is not guaranteed to preserve the states of the inner ranges.