lib/mongoid/matchable/nor.rb in mongoid-7.0.13 vs lib/mongoid/matchable/nor.rb in mongoid-7.1.0.rc0
- old
+ new
@@ -1,7 +1,8 @@
# frozen_string_literal: true
# encoding: utf-8
+
module Mongoid
module Matchable
# Defines behavior for handling $nor expressions in embedded documents.
class Nor < Default
@@ -16,10 +17,10 @@
#
# @param [ Array ] conditions The or expression.
#
# @return [ true, false ] True if matches, false if not.
#
- # @since 6.4.2/7.0.2/7.1.0
+ # @since 7.1.0
def _matches?(conditions)
if conditions.length == 0
# MongoDB does not allow $nor array to be empty, but
# Mongoid accepts an empty array for $or which MongoDB also
# prohibits