diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-10 08:26:36 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-10 08:26:36 +0000 |
commit | f449c04a3648f56a535399d4108b738e36059455 (patch) | |
tree | cecb154f054657360e54e8a4e249b804e1231536 /io.c | |
parent | 6395c3b38de70621232102597ee24c1fd136ca1b (diff) | |
download | ruby-f449c04a3648f56a535399d4108b738e36059455.tar.gz |
* io.c (read_all): should return given string even if data read is
empty. [ruby-dev:22207]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -801,7 +801,6 @@ read_all(fptr, siz, str) siz += BUFSIZ; rb_str_resize(str, siz); } - if (bytes == 0) return rb_str_new(0,0); if (bytes != siz) rb_str_resize(str, bytes); return str; @@ -3456,7 +3455,7 @@ rb_io_ctl(io, req, arg, io_p) rb_raise(rb_eArgError, "return value overflowed string"); } - if (fptr->f2 && fileno(fptr->f) != fileno(fptr->f2)) { + if (fptr->f2 && fileno(fptr->f) != fileno(fptr->f2)) { /* call on f2 too; ignore result */ io_cntl(fileno(fptr->f2), cmd, narg, io_p); } |