paulmillr/es6-shim — pull request #203 by cscott (2014-02-04 23:13:02+00:00)
Title: Don't use fast path after -0 is added to a Set.

The fast path for Set stores the set elements as properties of a backing
object. But -0, when used as a property, gets coerced to "0" and the sign
is lost. When we later `ensureMap` we end up using +0 as the key instead
of -0.

To avoid this error, force `ensureMap` before adding -0 to the set. This
uses the slightly slower (but still O(1)) Map backing storage, which
properly preserves the sign of -0 when it is used as a key.

Closes #202.