You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logic in strTranscode evolved over the years to allow same-encoding
requests to be no-ops. Those changes were never applied to
rbByteEncode, resulting in same-encoding requests triggering
errors when the transcoding subsystem saw nothing would be done.
This complicated efforts to solve jruby#8682 by passing an
encoding to the IOOutputStream constructor (ruby/json#759 and
ruby/json#760).
This patch allows using IOOutputStream and the byte[] IO API it
calls with an externally-encoded IO by passing in an expected
encoding for incoming bytes. All bytes will be treated as being
encoded properly, and if the source and destination encoding is the
same, rbByteEncode will return null to indicate no-op.
Note that this misses some functionality of strTranscode in that it
does not scrub the string for same-encoding requests.
Partially addresses ruby/json#760.
Fixesjruby#8686.
0 commit comments