Fix some compatibility issues with Enumerable API

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.0.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Copied from https://github.com/mongodb/mongoid/pull/5831

      Hi, in accordance with Ruby's enumerable API, I've added support for initial value when a block is given to Enumerable#sum.

      Tell me if the provided changes are ok and I could replicate the same changes to min and max methods.

      Cheers!

              Assignee:
              Jamis Buck
              Reporter:
              Dmitry Rybakov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: