to_bson_int64 methods should convert all fixnum to bson_int64

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • bson-4.2.0
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Environment:
      Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      1.Try convert some fixnum number directly to bson_int64
      require 'bson'
      s=102.to_bson_int64(102)
      2.Check s.bson_type

      Actual: It returns '\x10'.

      Expected: Since the method is called to_bson_int64 - it should work as it names and set the bson_type to '\x12'. In my particular case, our dev guys wrote their own c++ bson parser and for some number values always expect to have bson_int64on server. So far I have to use extremely big numbers for those values, but it looks ugly.

            Assignee:
            Emily Stolfo (Inactive)
            Reporter:
            Ivan Pevtsov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: