lib/bullet/mongoid7x.rb in bullet-6.1.2 vs lib/bullet/mongoid7x.rb in bullet-6.1.3

- old
+ new

@@ -21,10 +21,10 @@ Bullet::Detector::NPlusOneQuery.add_impossible_object(result) if result result end def each(&block) - return to_enum unless block_given? + return to_enum unless block records = [] origin_each { |record| records << record } if records.length > 1 Bullet::Detector::NPlusOneQuery.add_possible_objects(records)