Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-804

aggregate command fails with symbol keys

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.12
    • Affects Version/s: 1.11.0
    • Component/s: Public API
    • None
    • 1

      command {aggregate: 'test', pipeline: [{'$match' => {_id: true}}]} fails as the implementation checks for string 'pipeline' and not symbol :pipeline.

      $ mongo_console
      > Mongo::MongoClient.new.db('test').command({aggregate: 'test', pipeline: [{'$match' => {_id: true}}]})
      NoMethodError: undefined method `none?' for nil:NilClass
      from /Users/gjm/.rvm/gems/ruby-2.1.1/gems/mongo-1.11.1/lib/mongo/functional/read_preference.rb:77:in `secondary_ok?'

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            gjmurakami Gary Murakami
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: