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

Rename #set_mul method to #mul

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The implementation of MONGOID-5442 added the $mul operator in a Ruby method named #set_mul.

      This name (#set_mul) is incongruent with #inc, #bit, #pop, and other atomic operators for which the Ruby method name exactly matches the native MongoDB operator name.

      Unless there is a strong justification as to why the prefix "set_" should be introduced for the $mul operator specifically, we should stick with just #mul to be consistent. There was such a justification for the $min/$max operators whose names conflicted with existing Ruby method names, however no such situation exists for $mul.

      PR is raised here: https://github.com/mongodb/mongoid/pull/5527.

            Assignee:
            jamis.buck@mongodb.com Jamis Buck
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: