summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-12 08:12:42 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-12 08:12:42 +0000
commitd9aec0cbe37a202118f36b08cbd61c370862eca0 (patch)
tree0c0e5ee9e6524a883c9bdc1e3d3ebdad1c6b80ec /test
parent5bac006483d7eabde10e354da39ca27135dade60 (diff)
* io.c (rb_io_eof, remain_size, read_all, io_read, appendline)
(swallow, rb_io_each_byte, rb_io_getc): revert previous change. * io.c (rb_io_eof, io_fread, appendline, swallow, rb_io_each_byte) (rb_io_getc, rb_getc): call clearerr before getc to avoid stdio incompatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/ut_eof.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/ut_eof.rb b/test/ruby/ut_eof.rb
index b7219dd..e6f6edd 100644
--- a/test/ruby/ut_eof.rb
+++ b/test/ruby/ut_eof.rb
@@ -6,8 +6,8 @@ module TestEOF
assert_equal("", f.read(0))
assert_equal("", f.read(0))
assert_equal("", f.read)
- assert_equal("", f.read(0))
- assert_equal("", f.read(0))
+ assert_nil(f.read(0))
+ assert_nil(f.read(0))
}
open_file("") {|f|
assert_nil(f.read(1))
@@ -43,8 +43,8 @@ module TestEOF
assert_equal("" , f.read(0))
assert_equal("" , f.read(0))
assert_equal("", f.read)
- assert_equal("", f.read(0))
- assert_equal("", f.read(0))
+ assert_nil(f.read(0))
+ assert_nil(f.read(0))
}
open_file("a") {|f|
assert_equal("a", f.read(1))
@@ -69,7 +69,7 @@ module TestEOF
}
open_file("a") {|f|
assert_equal("a", f.read)
- assert_equal("", f.read(0))
+ assert_nil(f.read(0))
}
open_file("a") {|f|
s = "x"
@@ -109,7 +109,7 @@ module TestEOF
assert_equal(10, f.pos)
assert_equal("", f.read(0))
assert_equal("", f.read)
- assert_equal("", f.read(0))
+ assert_nil(f.read(0))
assert_equal("", f.read)
}
end