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

Add test coverage for symbol round-tripping in Hash field values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.12.0.rc0, 2.11.4, 2.10.5
    • None
    • None
    • Fully Compatible

    Description

      The driver round-trips symbol values in hashes:

      butler% irb -rmongo
      irb(main):001:0> Hash.from_bson({foo: :bar}.to_bson)
      => {"foo"=>:bar}
       
      
      

      This behavior is different from that of bson-ruby:

      butler% irb -rbson
      irb(main):001:0> Hash.from_bson({foo: :bar}.to_bson)
      => {"foo"=>"bar"}
      

      As far as I can see there are no tests for this. This ticket is to add the missing test coverage.

      Attachments

        Issue Links

          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: