rails/rails — pull request #6830 by cpatuzzo (2012-06-22 18:36:47+00:00)
Title: Warn on name collisions between Array instance methods and base class methods

Warn users in cases where they have named a scope the same as an Array instance method. Delegation gives precedence to Arrays, so it could confuse the developer as to why their scope is never evaluated.

The following example illustrates this problem:

```ruby
class Foo < ActiveRecord::Base
def self.reverse
order(:id => 'desc')
end
end
```

When we call:

```ruby
Foo.scoped.reverse
```