From 74cb18404488a524996b39d4e93837bc23fb7fb8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 24 Feb 2016 01:44:21 +0000 Subject: middleware: minor bytecode size reduction The "defineclass" VM instruction takes more operands and uses more space than "setconstant". Since we have no methods or subclasses/constants to define under the "Raindrops::Middleware::Stats" class, --- lib/raindrops/middleware.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/raindrops/middleware.rb b/lib/raindrops/middleware.rb index bf16924..da2fb9d 100644 --- a/lib/raindrops/middleware.rb +++ b/lib/raindrops/middleware.rb @@ -77,8 +77,7 @@ class Raindrops::Middleware # and both counters are updated atomically. # # This is supported on all operating systems supported by Raindrops - class Stats < Raindrops::Struct.new(:calling, :writing) - end + Stats = Raindrops::Struct.new(:calling, :writing) # :stopdoc: require "raindrops/middleware/proxy" -- cgit v1.2.3-24-ge0c7