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

* io.c (remain_size): IO#read returns "" if file.size == 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2002-04-11 10:11:53 +00:00
parent 2628f376c9
commit 65a269376f
2 changed files with 4 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Thu Apr 11 19:10:37 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* io.c (remain_size): IO#read returns "" if file.size == 0.
Thu Apr 11 09:31:19 2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp> Thu Apr 11 09:31:19 2002 Takaaki Tateishi <ttate@kt.jaist.ac.jp>
* ext/dl/ptr.c: raise() -> rb_raise(). (Thanks Tetsuya Watanabe) * ext/dl/ptr.c: raise() -> rb_raise(). (Thanks Tetsuya Watanabe)

3
io.c
View file

@ -625,9 +625,6 @@ remain_size(fptr)
{ {
off_t pos; off_t pos;
if (st.st_size == 0) {
return 1; /* force EOF */
}
pos = ftello(fptr->f); pos = ftello(fptr->f);
if (st.st_size > pos && pos >= 0) { if (st.st_size > pos && pos >= 0) {
siz = st.st_size - pos + 1; siz = st.st_size - pos + 1;