From 40916407517f4bdb75a295caf29e02d4f403349b Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 23 Sep 2017 11:07:32 +0200 Subject: style: rubocop mostly auto-correct --- lib/nickserver/handler_chain.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/nickserver/handler_chain.rb') diff --git a/lib/nickserver/handler_chain.rb b/lib/nickserver/handler_chain.rb index afc24a5..843313e 100644 --- a/lib/nickserver/handler_chain.rb +++ b/lib/nickserver/handler_chain.rb @@ -14,7 +14,6 @@ module Nickserver class HandlerChain - def initialize(*handlers) @handlers = handlers @exceptions_to_rescue = [] @@ -27,7 +26,7 @@ module Nickserver def handle(*args) result = nil - _handled_by = @handlers.find{|h| result = try_handler(h, *args)} + _handled_by = @handlers.find { |h| result = try_handler(h, *args) } result end @@ -41,7 +40,7 @@ module Nickserver def try_handler(handler, *args) result = handler.call(*args) rescue *exceptions_to_rescue - self.rescued_exceptions << $! + rescued_exceptions << $ERROR_INFO result = false end end -- cgit v1.2.3