From 65a269376f7262212512f29f5ace7d8702b3edf4 Mon Sep 17 00:00:00 2001 From: eban Date: Thu, 11 Apr 2002 10:11:53 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ io.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6248c97033..dec9f22c56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Apr 11 19:10:37 2002 WATANABE Hirofumi + + * io.c (remain_size): IO#read returns "" if file.size == 0. + Thu Apr 11 09:31:19 2002 Takaaki Tateishi * ext/dl/ptr.c: raise() -> rb_raise(). (Thanks Tetsuya Watanabe) diff --git a/io.c b/io.c index 8057542f92..da93d45253 100644 --- a/io.c +++ b/io.c @@ -625,9 +625,6 @@ remain_size(fptr) { off_t pos; - if (st.st_size == 0) { - return 1; /* force EOF */ - } pos = ftello(fptr->f); if (st.st_size > pos && pos >= 0) { siz = st.st_size - pos + 1;