about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-24 16:48:50 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-24 16:48:50 -0800
commit6720cdda4b890ac42806a8fe290f96449a150c6a (patch)
tree39007738365e5a9ef3636202a9e9cbcd2b8ac7b0 /lib
parent54cf500266b35beecb9c30b8252e72af9fafbc3e (diff)
downloadclogger-6720cdda4b890ac42806a8fe290f96449a150c6a.tar.gz
They're not needed and a waste of code.
Diffstat (limited to 'lib')
-rw-r--r--lib/clogger.rb20
-rw-r--r--lib/clogger/format.rb8
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/clogger.rb b/lib/clogger.rb
index 1d4e012..0eeea5b 100644
--- a/lib/clogger.rb
+++ b/lib/clogger.rb
@@ -57,7 +57,7 @@ private
          path_info query_string script_name
          server_name server_port
          auth_type gateway_interface server_software path_translated
-         ).join('|') << ')\z').freeze
+         ).join('|') << ')\z')
 
   SCAN = /([^$]*)(\$+(?:env\{\w+(?:\.[\w\.]+)?\}|
                         e\{[^\}]+\}|
@@ -73,28 +73,28 @@ private
 
       unless tok.nil?
         if tok.sub!(/\A(\$+)\$/, '$')
-          rv << [ OP_LITERAL, $1.dup ]
+          rv << [ OP_LITERAL, $1 ]
         end
 
         compat = ALIASES[tok] and tok = compat
 
         case tok
         when /\A(\$*)\z/
-          rv << [ OP_LITERAL, $1.dup ]
+          rv << [ OP_LITERAL, $1 ]
         when /\A\$env\{(\w+(?:\.[\w\.]+))\}\z/
-          rv << [ OP_REQUEST, $1.freeze ]
+          rv << [ OP_REQUEST, $1 ]
         when /\A\$e\{([^\}]+)\}\z/
-          rv << [ OP_EVAL, $1.dup ]
+          rv << [ OP_EVAL, $1 ]
         when /\A\$cookie_(\w+)\z/
-          rv << [ OP_COOKIE, $1.dup.freeze ]
+          rv << [ OP_COOKIE, $1 ]
         when CGI_ENV, /\A\$(http_\w+)\z/
-          rv << [ OP_REQUEST, $1.upcase.freeze ]
+          rv << [ OP_REQUEST, $1.upcase ]
         when /\A\$sent_http_(\w+)\z/
-          rv << [ OP_RESPONSE, $1.downcase.tr('_','-').freeze ]
+          rv << [ OP_RESPONSE, $1.downcase.tr('_','-') ]
         when /\A\$time_local\{([^\}]+)\}\z/
-          rv << [ OP_TIME_LOCAL, $1.dup ]
+          rv << [ OP_TIME_LOCAL, $1 ]
         when /\A\$time_utc\{([^\}]+)\}\z/
-          rv << [ OP_TIME_UTC, $1.dup ]
+          rv << [ OP_TIME_UTC, $1 ]
         when /\A\$time\{(\d+)\}\z/
           rv << [ OP_TIME, *usec_conv_pair(tok, $1.to_i) ]
         when /\A\$request_time\{(\d+)\}\z/
diff --git a/lib/clogger/format.rb b/lib/clogger/format.rb
index 9e4f59f..54fe766 100644
--- a/lib/clogger/format.rb
+++ b/lib/clogger/format.rb
@@ -7,19 +7,19 @@ class Clogger
     # common log format used by Apache:
     # http://httpd.apache.org/docs/2.2/logs.html
     Common = "$remote_addr - $remote_user [$time_local] " \
-             '"$request" $status $response_length'.freeze
+             '"$request" $status $response_length'
 
     # combined log format used by Apache:
     # http://httpd.apache.org/docs/2.2/logs.html
-    Combined = %Q|#{Common} "$http_referer" "$http_user_agent"|.freeze
+    Combined = %Q|#{Common} "$http_referer" "$http_user_agent"|
 
     # combined log format used by nginx:
     # http://wiki.nginx.org/NginxHttpLogModule
-    NginxCombined = Combined.gsub(/response_length/, 'body_bytes_sent').freeze
+    NginxCombined = Combined.gsub(/response_length/, 'body_bytes_sent')
 
     # log format used by Rack 1.0
     Rack_1_0 = "$ip - $remote_user [$time_local{%d/%b/%Y %H:%M:%S}] " \
-               '"$request" $status $response_length $request_time{4}'.freeze
+               '"$request" $status $response_length $request_time{4}'
   end
 
 end