This saves over 400 bytes on x86-64.
---
 lib/yahns.rb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/yahns.rb b/lib/yahns.rb
index fd84223..b4a8bbe 100644
--- a/lib/yahns.rb
+++ b/lib/yahns.rb
@@ -50,11 +50,9 @@ module Yahns # :nodoc:
   # application dispatch.  This is always raised with an empty backtrace
   # since there is nothing in the application stack that is responsible
   # for client shutdowns/disconnects.
-  class ClientShutdown < EOFError # :nodoc:
-  end
+  ClientShutdown = Class.new(EOFError) # :nodoc:
 
-  class ClientTimeout < RuntimeError # :nodoc:
-  end
+  ClientTimeout = Class.new(RuntimeError) # :nodoc:
 
   # try to use the monotonic clock in Ruby >= 2.1, it is immune to clock
   # offset adjustments and generates less garbage (Float vs Time object)
-- 
EW


Reply via email to