emberjs/ember.js — pull request #3608 by hjdivad (2013-10-18 03:39:32+00:00)
Title: [BUGFIX beta] reduceComputed handle out of range indexes.

Make `ReduceComputedProperty`'s `DependentArrayObserver` respect out of range
indexes the same was `[].splice` and `MutableArray.replace` do, namely:

- idx >= length is treated as removing no items and pushing new items and
- idx < 0 && idx < |length| is treated as a 1-based index from the right and
- idx <= |length| is treated as 0.

Big thanks to @twokul for pairing on this fix.

Fix #3586.