1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make StringIO encoding fixed

Get rid of affects by default external encoding.
This commit is contained in:
Nobuyoshi Nakada 2020-07-20 13:38:37 +09:00
parent d2bf6133f6
commit 840115bf46
Notes: git 2020-07-20 14:59:47 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ describe "Kernel.printf" do
context "io is specified" do
it_behaves_like :kernel_sprintf, -> format, *args {
io = StringIO.new
io = StringIO.new(+"")
Kernel.printf(io, format, *args)
io.string
}
@ -51,7 +51,7 @@ describe "Kernel.printf" do
it_behaves_like :kernel_sprintf, -> format, *args {
stdout = $stdout
begin
$stdout = io = StringIO.new
$stdout = io = StringIO.new(+"")
Kernel.printf(format, *args)
io.string
ensure

View file

@ -32,7 +32,7 @@ describe "StringIO#printf" do
describe "formatting" do
it_behaves_like :kernel_sprintf, -> format, *args {
io = StringIO.new
io = StringIO.new(+"")
io.printf(format, *args)
io.string
}