From: Sean O'Dell Date: 2004-06-20T03:23:04+09:00 Subject: Re: [RCR] IO#readn On Saturday 19 June 2004 10:07, Simon Strandgaard wrote: > On Saturday 19 June 2004 19:01, Michael Neumann wrote: > [snip] > > > I never liked it that read(4) might return only 3 characters. > > Wouldn't it be better then to change the behavier of #read itself, so > it fails per default in case the specified number of bytes cannot be read. > > with ruby2 we should try to break as much as possible, and hopefully > get it right. > > #readn smells too much like workaround :-) I agree, a method called to read n bytes should raise an exception when it cannot. Sean O'Dell