Decimal128/BigDecimal interoperability in bson-ruby

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: bson-3.2.7, bson-4.8.2
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Just noticed that when we try to save document with BigDecimal value we get an error:

      BSON::Document.new("afa" => BigDecimal(161)).to_bson
      

      Fails with:

      NoMethodError: undefined method `bson_type' for 0.161e3:BigDecimal
      

              Assignee:
              Oleg Pudeyev (Inactive)
              Reporter:
              Alexey Zapparov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: