From: Eric Wong Date: 2013-07-27T08:14:59+09:00 Subject: [ruby-core:56208] Re: [Ruby 1.9 - Bug #5138][Open] Add nonblocking IO that does not use exceptions for EOF and EWOULDBLOCK Aaron Patterson wrote: > In the last developer meeting, matz suggested that the existing > nonblocking IO functions take an extra option to specify whether or not > exceptions should be raised. > > https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130712#Non-blocking-reads-without-exceptions-Feature-5138 > > Something like this: > > chunk = @io.read_nonblock(BUFSIZE, exception: false) > > I am happy with a solution like this. OK, I am also happy (especially since small hashes are packed, now). So the existing outbuf arg also becomes a keyword arg? chunk = @io.read_nonblock(BUFSIZE, exception: false, outbuf: string)