diff options
| author | Akira Yumiyama <[email protected]> | 2013-06-02 12:03:45 +0900 |
|---|---|---|
| committer | Akira Yumiyama <[email protected]> | 2013-06-02 13:24:34 +0900 |
| commit | 1272df7cb6db0603113cabd5eee126739bf81115 (patch) | |
| tree | 5d556f1a29619acd6457954f9c20efebb4ebad07 | |
| parent | 0a21d9ec920675bdbfa4f7705764f6f648fdd335 (diff) | |
| download | mruby-1272df7cb6db0603113cabd5eee126739bf81115.tar.gz mruby-1272df7cb6db0603113cabd5eee126739bf81115.zip | |
fix IO#eof? method (consider the read buffer)
| -rw-r--r-- | mrblib/io.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 = '' |
