Browse files

ruby 1.9 compat: collect without a block returns enumerator

fixes 13 failing specs
  • Loading branch information...
1 parent 05bbbbe commit 2cf722a40c5ceb9c4f69125dffe9e3086eb5a736 brainopia committed Feb 8, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mongoid/criteria.rb
View
2 lib/mongoid/criteria.rb
@@ -70,7 +70,7 @@ def ==(other)
self.selector == other.selector && self.options == other.options
when Enumerable
@collection ||= execute
- return (@collection.collect == other)
+ return (@collection.entries == other)
else
return false
end

0 comments on commit 2cf722a

Please sign in to comment.