emberjs/ember.js — pull request #382 by elucid (2012-01-12 05:37:19+00:00)
Title: fix Enumerable *Property functions to correctly handle explicit undefined second argument

Some functions in the Enumerable mixin such as filterProperty, findProperty, etc. behave oddly when the optional second argument is explicitly provided but is undefined.

For example,

```javascript
var bar = Ember.Object.create({});
[{bar_id: 1},
{bar_id: 2},
{bar_id: 3}].filterProperty('bar_id', bar.get('id'));
```

returns `[{bar_id: 1}, {bar_id: 2}, {bar_id: 3}]` instead of `[]`. Analogous bugs exist for findProperty, someProperty, and everyProperty.

This commit fixes these bugs and adds additional tests for 2-arg versions of the Enumerable *Property functions.