1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn't

raise EOFError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2003-12-28 11:27:42 +00:00
parent 3c288b427d
commit 745ce54b4a
3 changed files with 10 additions and 2 deletions

View file

@ -908,7 +908,7 @@ strio_sysread(argc, argv, self)
VALUE self;
{
VALUE val = strio_read(argc, argv, self);
if (NIL_P(val)) {
if (NIL_P(val) || RSTRING(val)->len == 0) {
rb_eof_error();
}
return val;