symbolize_keys! when called on a BSON::Document produces a broken object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • bson-4.12.1
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      With ActiveSupport 5.2.4:

       

      d = BSON::Document.new(foo: 'bar')
      d[:foo] # "bar"
      d['foo'] # "bar"

      d.symbolize_keys!
      d[:foo] # nil
      d['foo'] # nil

      d.to_h # {:foo=>"bar"}; it's still in there

            Assignee:
            Oleg Pudeyev (Inactive)
            Reporter:
            Brian Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: