ahawkins/ember.js — pull request #1 by fny (2014-07-09 21:23:21+00:00)
Title: Wrap Function Args in Function#apply in Groupable

The uses of `Function#apply(this, argumentsArray)` in the `GroupableMixin` need to wrap the arguments to be applied in an Array:

```javascript
// This...
this._super.apply(this, array, idx, removedCount, addedCount);
// ...should be this...
this._super.apply(this, [array, idx, removedCount, addedCount]);
```

You'll start to see errors if you try to use the GroupableMixin with the SortableMixin and then make a change to the array:

```javascript
var beer = Ember.Object.create({kind: 'drink', name: 'Beer'});
var groupedArray = Ember.ArrayProxy.createWithMixins(Ember.SortableMixin, Ember.GroupableMixin,{
sortProperties: ['name'],
groupBy: 'kind',
content: Ember.A([
beer, Ember.Object.create({kind: 'car', name: 'Mustang'})
])
});
groupedArray.removeObject(beer); // => Goes boom.
```