lib/sleepy_penguin/epoll.rb in sleepy_penguin-3.5.0 vs lib/sleepy_penguin/epoll.rb in sleepy_penguin-3.5.1
- old
+ new
@@ -25,11 +25,10 @@
# auto-reinitialize the Epoll object after forking
def __ep_check # :nodoc:
return if @pid == $$
return if @io.closed?
objects = @copies.values
- @copies.each_key { |epio| epio.close }
- @copies.clear
+ @copies.each_key(&:close).clear
__ep_reinit
objects.each do |obj|
io_dup = @io.dup
@copies[io_dup] = obj
end