From: Michael Neumann Date: 2004-06-20T00:23:00+09:00 Subject: [RCR] IO#readn Hi, I suggest to add a method readn to the IO class (and to StringIO, Socket...), which behaves similar to read(n), but raises an exception if the returned string is not of size n. class IO def readn(n) str = read(n) raise if str.nil? or str.size != n str end end It's annoying to test for it in the application. Regards, Michael