Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2572

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

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

      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@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            brian@sideqik.com Brian Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: