forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call write directly rather than through stream
The OutputStream returned by RubyIO.getOutputStream encodes all strings as ASCII-8BIT which makes it incompatible with any IO that has an incompatible external encoding. That is a separate bug, but it affects uses of IOOutputStream that should be ok. IOOutputStream aggregates an encoding to use, so it should be able to pass properly-encoded strings through to the IO. This change avoids using the stream from getOutputStream and instead calls RubyIO.write directly. This fixes the ASCII-8BIT failure noted in ruby/psych#481.
- Loading branch information
Showing
1 changed file
with
35 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters