From f1f90757c40ce448a8ec43fb7dcb2ee14acbdb11 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 25 Dec 2008 09:58:07 +0000 Subject: merges r20989 from trunk into ruby_1_9_1. * io.c (flush_before_seek): check io_fflush result. (rb_io_check_readable): ditto. (rb_io_flush): ditto. (rb_io_fsync): ditto. (remain_size): ditto. (rb_io_write_nonblock): ditto. (finish_writeconv): ditto. (fptr_finalize): ditto. (io_reopen): ditto. (rb_io_reopen): ditto. (copy_stream_body): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 78cb425ed1..40808da772 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1221,13 +1221,13 @@ class TestIO < Test::Unit::TestCase def test_initialize t = make_tempfile - fd = IO.sysopen(t.path) + fd = IO.sysopen(t.path, "w") assert_kind_of(Integer, fd) f = IO.new(fd, "w") f.write("FOO\n") f.close - assert_equal("foo\nbar\nbaz\n", File.read(t.path)) + assert_equal("FOO\n", File.read(t.path)) f = open(t.path) assert_raise(RuntimeError) do -- cgit v1.2.3