Hi
Given the following code:
in_io,out_io = IO.pipe(“binary”, “binary”)
I would expect both in_io and out_io to give ‘binary’ on all encodings,
yet I get binary only on in_io’s external_encoding:
in_io.internal_encoding # => nil
in_io.external_encoding # => #Encoding:ASCII-8BIT
out_io.internal_encoding # => nil
out_io.external_encoding # => #Encoding:UTF-8
Some diagnostic information:
RUBY_DESCRIPTION # => “ruby 1.9.3p194 (2012-04-20 revision 35410)
[x86_64-darwin11.3.0]”
Encoding.default_internal # => #Encoding:UTF-8
Encoding.default_external # => #Encoding:UTF-8
I’d consider this a bug. But before reporting, I’d like to get the input
from others. What do you think, is this a bug? If not, why not?
Best regards
Stefan, aka apeiros