How to tell if 8767 was backported to 2.0.0

I’m on 2.0.0-p598 and I see a problem that looks a lot like
Bug #8767: IO.copy_stream should write in binary mode. - Ruby master - Ruby Issue Tracking System (IO.copy_stream should write in
binary mode). It’s unclear if this patch was ever backported to 2.0.0.
How
can I tell?

-Justin

Subject: How to tell if 8767 was backported to 2.0.0
Date: Wed 19 Nov 14 08:48:38PM -0600

Quoting Justin C. ([email protected]):

I’m on 2.0.0-p598 and I see a problem that looks a lot like
Bug #8767: IO.copy_stream should write in binary mode. - Ruby master - Ruby Issue Tracking System (IO.copy_stream should write in
binary mode). It’s unclear if this patch was ever backported to 2.0.0. How
can I tell?

The page that describes the issue (the link you post) includes some
test code:

–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–
require ‘tempfile’
require ‘stringio’
Encoding.default_internal = ‘UTF-8’
out = Tempfile.new(‘out’)
out.binmode

before this patch it raises:

in `write’: “\xDE” from ASCII-8BIT to UTF-8

(Encoding::UndefinedConversionError)
IO.copy_stream(StringIO.new(“\xDE\xAD\xBE\xEF”), out)
–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–

As mentioned in the comment, if the patch is not applied, an exception
of class Encoding::UndefinedConversionError will be raised when
running it.

Carlo

Justin C. [email protected] wrote:

I’m on 2.0.0-p598 and I see a problem that looks a lot like
Bug #8767: IO.copy_stream should write in binary mode. - Ruby master - Ruby Issue Tracking System (IO.copy_stream should write in
binary mode). It’s unclear if this patch was ever backported to 2.0.0. How
can I tell?

Check the ChangeLog file that you got with the release and search for
“8767” in the commit messages. It looks like it was not backported,
so you can file a backport ticket:

https://bugs.ruby-lang.org/projects/ruby/wiki/HowToRequestBackport

Thanks Eric. That was just what i was looking for. I’ve opened

-Justin