Fix nested symbol operator during Selector.merge!()

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 7.2.1
    • Component/s: Query
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Selector.merge!() incorrectly handles nested Hash's containing `$in` and `$nin` operators, where one operator is a String and the other is a Symbol. This PR fixes this issue, along with unit tests that repro the problem behavior in the old code.

      This change was originally inspired by a Symbol-String bug manifesting in a chained Query.where().where(). A key cause of this bug was in Selector.merge!(). The second change which fixes the higher level Query.where().where() bug is part of a different module (Storable vs. Selector). I will be submitting that fix + test case(s) in a separate PR.

      The PR is already ready to be reviewed/merged: https://github.com/mongodb/mongoid/pull/4965

              Assignee:
              Oleg Pudeyev (Inactive)
              Reporter:
              Dalton Black
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: