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

BSON::Binary.new does not accept binary encoded strings

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 12_01_17
    • Affects Version/s: None
    • Component/s: BSON

      The patch in issue BSON-950 that was released as BSON gem 3.1.2 breaks BSON::Binary for strings that are not UTF8 encoded and which aren't UTF8 compatible. In Ruby `string.encode encoding` can fail with an exception as opposed to `string.force_encoding encoding`.
      Gist with example failing code and it's output:
      https://gist.github.com/amw/96b791e6c134a419528f

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            amw Adam Wróbel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: