Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3518

BSON::ObjectId::Generator counter is broken

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:

      Description

      Mongoid 4 beta release, ruby 2.1.0

      On inspection, the @counter variable is never incremented because the #next method is never executed. This is because, I believe, in Ruby 2 you cannot define methods that are native Ruby keywords (in this case next).

      I fixed the issue in my project by simply renaming next to _next.

        Attachments

          Activity

            People

            Assignee:
            durran Durran Jordan
            Reporter:
            justinko justinko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: