about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-03 23:49:08 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-03 23:49:08 -0800
commite5491062605d1d6bec1c43bfadb5e348c142df8d (patch)
tree05335fb91a940139eba9dd967b8221c63828227f
parent57613afdafccf75f4e40646867877bfa06dbcd93 (diff)
downloadunicorn-e5491062605d1d6bec1c43bfadb5e348c142df8d.tar.gz
?/ avoids allocating a String in 1.8 and in 1.9 short String
objects are cheap.
-rw-r--r--lib/unicorn/util.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index 6b35426..4bbc590 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -21,7 +21,7 @@ module Unicorn
 
         ObjectSpace.each_object(File) do |fp|
           next if fp.closed?
-          next unless (fp.sync && fp.path[0..0] == "/")
+          next unless (fp.sync && fp.path[0] == ?/)
           next unless (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
 
           begin