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

Decimal128/BigDecimal interoperability in bson-ruby

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • bson-3.2.7, bson-4.8.2
    • None
    • BSON
    • None

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

              oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
              alexey@zapparov.com Alexey Zapparov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: