Permalink
Browse files

Avoid sorting an Array including objects from different Classes

addresses "ArgumentError: comparison of VerySpecialComment with SpecialComment failed" in ActiveRecord::DelegationRelationTest#test_#sort!_delegation_is_deprecated
  • Loading branch information...
1 parent 48b1013 commit 3ce9e43bc343283ac738efb5b9b11672cb6a78b3 @amatsuda amatsuda committed Nov 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/relation/delegation_test.rb
@@ -64,7 +64,7 @@ class DelegationRelationTest < DelegationTest
fixtures :comments
def target
- Comment.where.not(body: nil)
+ Comment.where(body: 'Normal type')
end
[:map, :collect].each do |method|

0 comments on commit 3ce9e43

Please sign in to comment.