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

Make Hash.mongoize return a new Hash rather than modifying its argument

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.2
    • Affects Version/s: None
    • Component/s: None
    • None

      This bug was causing confusing behavior that would prevent mongoid setter methods from being able to accept frozen Hashes:

      some_mongoid_model.my_attr =

      {a: 1}

      .freeze

      1. kablammo! "Can't modify frozen Hash"

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            misfo misfo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: