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

Decimal128/BigDecimal interoperability in bson-ruby

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: bson-3.2.7, bson-4.8.2
    • Component/s: BSON
    • 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@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            alexey@zapparov.com Alexey Zapparov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: