From 18abca0e68a53478b475ef39e3127a943ba5d8d3 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 18 Jun 2008 09:45:41 +0000 Subject: * test/ruby/test_io.rb (test_copy_stream_dst_rbuf): set binmode. * test/ruby/test_io.rb (make_tempfile): set binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 313fc0c864..4f2f40044b 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -536,7 +536,7 @@ class TestIO < Test::Unit::TestCase with_pipe {|r, w| w << "xyz" w.close - File.open("fom", "w+") {|f| + File.open("fom", "w+b") {|f| f.write "abcd\n" f.rewind assert_equal("abc", f.read(3)) @@ -773,6 +773,7 @@ class TestIO < Test::Unit::TestCase def make_tempfile t = Tempfile.new("foo") + t.binmode t.puts "foo" t.puts "bar" t.puts "baz" -- cgit v1.2.3