apigee/rhino — pull request #22 by eshepelyuk (2014-12-11 08:21:20+00:00)
Title: Resolves #5 Implementation of find and findIndex for Arrays

During implementation I've found several issues regarding Rhino's Array implementation, so not all of V8 test cases are passing

.1. methods like `find` and `findIndex` could be called with `RegExp` passed as callback function. i.e.
```
[1,2,3].find(/\d+/);
```
The reason is because `NativeRegExp` is implementing `Function` interface. I've tried to fix this bahaviour, but some tests failed.
2. `Array` methods are not checking if the called on `null` or `undefined` when called through `prototype` methods with either `call` or `apply`, e.g.
```
Array.prototype.findIndex.call(null, function() { });
Array.prototype.findIndex.apply(undefined, function() { }, []);
```
This is doen intentionally on `NativeArray` class.

@gbrail could we discuss this ? maybe it's possible to check global behavior of`NativeArray` to be more specification compatible ?