about summary refs log tree commit homepage
path: root/lib/yahns.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-02-06 23:11:51 +0000
committerEric Wong <e@80x24.org>2015-02-10 01:56:23 +0000
commitbfa6e5de4ff999af0e9bf1ca9b604249c879e39a (patch)
tree5bd536cd824722fb4de2f0003ab273c83217811a /lib/yahns.rb
parenteb90ff89627a9001ae224f542e75919dc6fd96c9 (diff)
downloadyahns-bfa6e5de4ff999af0e9bf1ca9b604249c879e39a.tar.gz
This saves over 400 bytes on x86-64.
Diffstat (limited to 'lib/yahns.rb')
-rw-r--r--lib/yahns.rb6
1 files 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)