title: Why doesn't #is_a? work with an instance of ActiveRecord::NamedScope::Scope
body: <p>I'm using Rails 2.3.9.  To illustrate the issue, suppose we have a named scope on a model:</p>
  
  <pre><code>class Book &lt; ActiveRecord::Base
    named_scope :has_isbn, :conditions =&gt; 'isbn IS NOT NULL'
  end
  </code></pre>
  
  <p>If you get the class of the named scope, <code>ActiveRecord::NamedScope::Scope</code> is returned:</p>
  
  <pre><code>Book.has_isbn.class
  # =&gt; ActiveRecord::NamedScope::Scope
  </code></pre>
  
  <p>However, if you use <code>#is_a?</code> or <code>===</code> to figure out whether it is a scope, it returns <code>false</code>:</p>
  
  <pre><code>Book.has_isbn.is_a?(ActiveRecord::NamedScope::Scope)
  # =&gt; false
  ActiveRecord::NamedScope::Scope === Book.has_isbn
  # =&gt; false
  </code></pre>
  
  <p>Does anyone know why this is happening?  Calling a named scope returns an instance of <code>ActiveRecord::NamedScope::Scope</code> (if you look at <code>lib/active_record/named_scope.rb</code> in the Rails code, you can see it calls <code>Scope.new</code> and returns it), so why doesn't <code>#is_a?</code> and <code>===</code> return <code>true</code>?</p>