[ruby-cvs:57368] normal:r50219 (trunk): lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock

normal at ruby-lang.org normal at ruby-lang.org
Sat Apr 11 06:05:30 JST 2015


normal	2015-04-11 06:05:29 +0900 (Sat, 11 Apr 2015)

  New Revision: 50219

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50219

  Log:
    lib/net/protocol.rb (rbuf_fill): avoid exception with read_nonblock
    
    Exceptions are noisy in debug output and waste allocations.
    Use "exception: false" introduced in 2.1 to return symbols for
    common errors instead.
    
    Follow-up commits will be prepared to reduce EOFError exceptions
    to further quiet debug output and IO.select may be replaced by
    io/wait methods if available to reduce allocations.
    
    [ruby-core:68787] [Feature #11044]

  Modified files:
    trunk/ChangeLog
    trunk/lib/net/protocol.rb


More information about the ruby-cvs mailing list