rubinius/rubinius — pull request #3133 by jemc (2014-09-18 03:15:37+00:00)
Title: Implement Array#count instead of falling back to Enumerable#count

This avoids iteration with #each if no arguments are given.

This is an easy win for performance for large arrays, and MRI and JRuby already have this optimization.

In addition to performance, the implementing Module as given by introspection now matches MRI, meaning behavior will be consistent if some silly user deems to monkey-patch `Enumerable#count`.

```ruby
Array.instance_method(:count).owner #=> Array (not Enumerable)
```