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

JRuby branch has trouble BSON encoding/decoding floating point numbers

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: 1.0.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      OSX 10.6.4, JDK 1.6.0_u20, jruby 1.5.1 release

      I modified the bson_benchmark.rb file to work with the new BSON class interface and ran the benchmark. It fails on the last trial.

      case {"this"=>5, "is"=>

      {"a"=>true}, "big"=>[true, 5.5], "object"=>nil}
      enc bson
      took: 30.6319999694824
      dec bson
      took: 57.5120000839233
      expected: {"this"=>5, "is"=>{"a"=>true}

      , "big"=>[true, 5.5], "object"=>nil}
      got: {"this"=>5, "is"=>

      {"a"=>true}

      , "big"=>[true, 5], "object"=>nil}

      Note that the embedded array should contain 5.5 but the decode came back as an integer.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            cremes Chuck Remes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: