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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Public API
    • Labels:
      None
    • Environment:
      Linux, IRB session

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: