зеркало из https://github.com/github/ruby.git
Make StringIO encoding fixed
Get rid of affects by default external encoding.
This commit is contained in:
Родитель
d2bf6133f6
Коммит
840115bf46
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче