ruby-changes:44801
From: kazu <ko1@a...>
Date: Tue, 22 Nov 2016 22:59:24 +0900 (JST)
Subject: [ruby-changes:44801] kazu:r56874 (trunk): IOError does not happen
kazu 2016-11-22 22:59:16 +0900 (Tue, 22 Nov 2016) New Revision: 56874 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56874 Log: IOError does not happen * IOError does not happen even if another thread closes io * Use symbol proc Modified files: trunk/lib/webrick/server.rb Index: lib/webrick/server.rb =================================================================== --- lib/webrick/server.rb (revision 56873) +++ lib/webrick/server.rb (revision 56874) @@ -327,12 +327,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/server.rb#L327 def cleanup_shutdown_pipe(shutdown_pipe) @shutdown_pipe = nil return if !shutdown_pipe - shutdown_pipe.each {|io| - begin - io.close - rescue IOError # another thread closed io. - end - } + shutdown_pipe.each(&:close) end def alarm_shutdown_pipe -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/