-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JRuby updates and fixes #481
Conversation
OutputStreamWriter from JDK buffers outgoing bytes with a 8k buffer, which causes some small document emits to never make it into the outgoing stream unless that stream gets flushed or closed.
2b743ec
to
5d734aa
Compare
Back to 13F4E with commits so far, and we are back to most failures being related to minor behavior differences in SnakeYAML. Here is a complete list of failures now; only the two TestStream failures are new to me, but they appear to also be caused by the same sort of issue. I would really like to get this library green somehow so if it fails we know something new is broken, but I am not sure how to rectify these differences.
|
parse should reject input encoded incorrectly. The default behavior for InputStreamReader is to replace malformed characters, which causes one exception-expecting test to fail. This patch changes the behavior to report malformed input, which can then be reraised as a syntax error.
Link with jruby/jruby#6578. |
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.
jruby/jruby#6587 brings this to 12F3E. Most of these are in the following categories, which I have brought up with @asomov in https://bitbucket.org/asomov/snakeyaml/issues/498/clarifying-differences-from-libyaml:
I'm still trying to figure out the two URI failures and the missing error in test_emit_alias. |
Trying to get the suite green(er) again.