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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: BSON
    • Labels:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: