-
Notifications
You must be signed in to change notification settings - Fork 42
Home
JMongol edited this page Jun 28, 2012
·
3 revisions
Really it's 1.9's OpenSSL interaction with Encoding. When Ruby's OpenSSL lib decrypts something it can't know what the encoding of the original String was, so it defaults to Encoding:ASCII-8BIT
, which is Ruby's way of saying "raw-bytes". Depending on the encoding and content of strings in your app concatenation with Encoding:ASCII-8BIT
strings may raise an Encoding::CompatibilityError
. To work around this, change the encoding of the decrypted string with #.force_encoding
.