もりきゅうです。win32だけかもしれません。

f = File.open("db", "wb+")
f.print "."
while line = f.read(1)
  p line
end

d:/usr/doc/app/1.rb:3: [BUG] rb_sys_fail() - errno == 0
ruby 1.8.0 (2002-12-26) [i386-mswin32]

1.6.8では様子が違います。
D:\usr\doc\app>d:\ruby\bin\ruby -vd 1.rb
ruby 1.6.8 (2002-12-24) [i586-mswin32]
Exception `Errno::E000' at 1.rb:3 - No error - "db"
1.rb:3:in `read': No error - "db" (Errno::E000)
        from 1.rb:3

----
YOSHIDA Kazuhiro  moriq / moriq.com  http://www.moriq.com/