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

Test Symbol de/serialization with its bson_type configured to both string and symbol

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • bson-4.8.0
    • None
    • BSON
    • None
    • Fully Compatible

    Description

      bson-ruby deserializes bson symbols into strings. However the driver overrides this behavior to deserialize symbols to bson symbols: https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/bson.rb#L29

      This override requires that bson-ruby uses bson_type during deserialization to find out the Ruby bson type that is supposed to be used.

      bson-ruby needs to have tests added that changing bson_type affects the type of deserialized value.

      Attachments

        Activity

          People

            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: