牧瀬と申します。
IO#read(len) に 0 や負の数を与えたときの動作がおかしいようです。
% ls -l hoge.txt
-rw-r--r-- 1 ee77058 21621 5247 Oct 12 11:07 hoge.txt
% ruby -e 'fp=open("hoge.txt"); p fp.read(0); fp.close'
/tmp/rb01Ut8M:1:in `read': No such file or directory - hoge.txt (Errno::ENOENT)
from /tmp/rb01Ut8M:1
% ruby -e 'fp=open("hoge.txt"); p fp.read(-10); fp.close'
/tmp/rb0tgUc5:1:in `read': failed to allocate memory (fatal)
from /tmp/rb0tgUc5:1
ruby のバージョンは ruby 1.4.2 (1999-09-18) [sparc-solaris2.6] です。
----------------------------------------------
牧瀬 芳太郎 / ee77058 / isc.meiji.ac.jp
明治大学 理工学部 情報科学科 3年
http://www.isc.meiji.ac.jp/~ee77058/index.html
----------------------------------------------