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

aggregate command fails with symbol keys

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.12
    • Component/s: Public API
    • Labels:
      None
    • Story Points:
      1

      Description

      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?'

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: