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

Using a string instead of a hash in the projection method will freeze the method call

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.3
    • Affects Version/s: 2.0.2
    • Component/s: Public API
    • None
    • Environment:
      Linux, IRB session

      I decided to try the projection API without reading the documentation and tried something like this:

      connection['MyCollection'].find.projection('user').first

      It should be projection(user: 1) instead, but I don't think it should freeze when passing a string instead of a hash... An error message would be welcomed in this case.

            Assignee:
            spencer.brown@mongodb.com Spencer Brown
            Reporter:
            rosenfeld Rodrigo Rosenfeld Rosas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: