summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-14 09:38:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-14 09:38:56 +0000
commit3408e9e3c30115e16fb482ac29f147fb64953ebd (patch)
tree7b97b87e1c275626b256ce2850acf5825c3b0bc2 /test/net
parentc850c4ad37573037a6c202acbd50150b48c356c8 (diff)
revert r57323
StringIO.new makes the buffer IO.default_external, while StringIO.new("".dup) makes source encoding which is defaulted to UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net')
-rw-r--r--test/net/protocol/test_protocol.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/net/protocol/test_protocol.rb b/test/net/protocol/test_protocol.rb
index b47187b34b..048526b1c7 100644
--- a/test/net/protocol/test_protocol.rb
+++ b/test/net/protocol/test_protocol.rb
@@ -6,7 +6,7 @@ require "stringio"
class TestProtocol < Test::Unit::TestCase
def test_should_properly_dot_stuff_period_with_no_endline
bug9627 = '[ruby-core:61441] [Bug #9627]'
- sio = StringIO.new
+ sio = StringIO.new("".dup)
imio = Net::InternetMessageIO.new(sio)
email = "To: bob@aol.com\nlook, a period with no endline\n."
imio.write_message(email)
@@ -15,12 +15,12 @@ class TestProtocol < Test::Unit::TestCase
def test_each_crlf_line
assert_output('', '') do
- sio = StringIO.new
+ sio = StringIO.new("".dup)
imio = Net::InternetMessageIO.new(sio)
assert_equal(23, imio.write_message("\u3042\r\u3044\n\u3046\r\n\u3048"))
assert_equal("\u3042\r\n\u3044\r\n\u3046\r\n\u3048\r\n.\r\n", sio.string)
- sio = StringIO.new
+ sio = StringIO.new("".dup)
imio = Net::InternetMessageIO.new(sio)
assert_equal(8, imio.write_message("\u3042\r"))
assert_equal("\u3042\r\n.\r\n", sio.string)