PopFirst and PopLast do the opposite jobs

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2
    • Affects Version/s: 1.1
    • Component/s: None
    • None
    • None
    • Major Change
    • None
    • None
    • None
    • None
    • None
    • None

      Here is the PowerShell script that shows the bug:
      (on the other hand, it is not even needed, just double check the driver code of these methods)

      Add-Type -Path MongoDB.Driver.dll

      1. DOCS: http://www.mongodb.org/display/DOCS/Updating
      1. Output:
        Unknown macro: { "$pop" }
      2. Expected, see DOCS:
        Unknown macro: { $pop }

        $PopFirst = [MongoDB.Driver.Builders.Update]::PopFirst("name")
        $PopFirst.ToString()

      1. Output:
        Unknown macro: { "$pop" }
      2. Expected, see DOCS:
        Unknown macro: { $pop }

        $PopLast = [MongoDB.Driver.Builders.Update]::PopLast("name")
        $PopLast.ToString()

      Note: I have also tried some real example but the code is not so easy to share. Yes, these function do the opposite job, as if their bodies are swapped by mistake.

              Assignee:
              Robert Stam
              Reporter:
              Roman Kuzmin
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: