emberjs/ember.js — pull request #2246 by bestie (2013-03-08 20:35:39+00:00)
Title: Improve Ember.Array slice implementation

Add support for negative index arguments.
Still doesn't behave as native slice in edge cases.

The easiest way to reproduce is to create an ArrayProxy

```javascript
Ember.ArrayProxy.create({ content: Ember.A(['foo', 'bar']) }).slice(-2)
// => [undefined, undefined, "foo", "bar"]
```

Or if the array is empty

```javascript
Ember.ArrayProxy.create({ content: Ember.A([]) }).slice(-2)
// => [undefined, undefined]
```

There may be some edge cases still not mimicked, but this should improve experience for sane users of slice :)

I'm happy to separate out assertions into there own tests if that's desired.