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

BSON::ObjectId::Generator counter is broken

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None

      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.

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

              Created:
              Updated:
              Resolved: