From 1272df7cb6db0603113cabd5eee126739bf81115 Mon Sep 17 00:00:00 2001 From: Akira Yumiyama Date: Sun, 2 Jun 2013 12:03:45 +0900 Subject: fix IO#eof? method (consider the read buffer) --- mrblib/io.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mrblib/io.rb b/mrblib/io.rb index 011f1dc21..990a4b92d 100644 --- a/mrblib/io.rb +++ b/mrblib/io.rb @@ -55,7 +55,8 @@ class IO end def eof? - # XXX: @buf のことを考えなくてよい?? + return true if @buf && @buf.size > 0 + ret = false char = '' -- cgit v1.2.3