A 2.3.2 test case that spews:

/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:2189:in
`dup': can't dup NilClass (TypeError)
  from
/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:2189:in
`scoped_methods'
  from
/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:2193:in
`current_scoped_methods'
  from
/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:2183:in
`scope'
  from
/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:2414:in
`set_readonly_option!'
  from
/home/adam/ror/2.3.2/vendor/rails/activerecord/lib/active_record/base.rb:610:in
`find'
  from /home/adam/ror/2.3.2/lib/test1.rb:9:in `initialize_test'
  <snip>

Here is the relevant code to duplicate. The interesting thing is, just
the existance of the empty self.inherited(c) declaration triggers the
spew. Remove the declaration and no spew. Also, this works fine in 2.2.2
(no spew).

Create a fresh 2.3.2, and script/console this:

class Y < ActiveRecord::Base
  def self.inherited(c)
  end
end
class T < Y
end
T.find(:all)  # Unexpected spew
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to