From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C761320A1E; Fri, 14 Dec 2018 23:08:40 +0000 (UTC) From: Eric Wong To: sleepy-penguin@bogomips.org Cc: Eric Wong Subject: [PATCH] epoll: avoid reduce block capture and ivar requests Date: Fri, 14 Dec 2018 23:08:39 +0000 Message-Id: <20181214230839.15670-1-e@80x24.org> List-Id: Bytecode golfing... --- lib/sleepy_penguin/epoll.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/sleepy_penguin/epoll.rb b/lib/sleepy_penguin/epoll.rb index 7d173c8..bd340be 100644 --- a/lib/sleepy_penguin/epoll.rb +++ b/lib/sleepy_penguin/epoll.rb @@ -27,8 +27,7 @@ class SleepyPenguin::Epoll 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