emberjs/ember.js — pull request #2062 by pivotal-medici (2013-02-13 21:10:36+00:00)
Title: Close #2056 - Sync first/lastObject of array on computed property chainWatcher

This fixes a bug (#2056) with the first/last object computed properties of an array. It occurs within computed properties that (1) have an `array.@each` dependent key and (2) are being watched via a chain.

This patch ensures the following are true before any such computed properties are re-calculated:
- `firstObject` points to `array.objectAt(0)`
- `lastObject` points to `array.objectAt(array.length-1)`