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:
parent
d2bf6133f6
commit
840115bf46
Notes:
git
2020-07-20 14:59:47 +09:00
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ describe "Kernel.printf" do
|
||||||
|
|
||||||
context "io is specified" do
|
context "io is specified" do
|
||||||
it_behaves_like :kernel_sprintf, -> format, *args {
|
it_behaves_like :kernel_sprintf, -> format, *args {
|
||||||
io = StringIO.new
|
io = StringIO.new(+"")
|
||||||
Kernel.printf(io, format, *args)
|
Kernel.printf(io, format, *args)
|
||||||
io.string
|
io.string
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ describe "Kernel.printf" do
|
||||||
it_behaves_like :kernel_sprintf, -> format, *args {
|
it_behaves_like :kernel_sprintf, -> format, *args {
|
||||||
stdout = $stdout
|
stdout = $stdout
|
||||||
begin
|
begin
|
||||||
$stdout = io = StringIO.new
|
$stdout = io = StringIO.new(+"")
|
||||||
Kernel.printf(format, *args)
|
Kernel.printf(format, *args)
|
||||||
io.string
|
io.string
|
||||||
ensure
|
ensure
|
||||||
|
|
|
@ -32,7 +32,7 @@ describe "StringIO#printf" do
|
||||||
|
|
||||||
describe "formatting" do
|
describe "formatting" do
|
||||||
it_behaves_like :kernel_sprintf, -> format, *args {
|
it_behaves_like :kernel_sprintf, -> format, *args {
|
||||||
io = StringIO.new
|
io = StringIO.new(+"")
|
||||||
io.printf(format, *args)
|
io.printf(format, *args)
|
||||||
io.string
|
io.string
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue