From e5491062605d1d6bec1c43bfadb5e348c142df8d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Nov 2009 23:49:08 -0800 Subject: Util.reopen_logs: remove needless Range ?/ avoids allocating a String in 1.8 and in 1.9 short String objects are cheap. --- lib/unicorn/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-24-ge0c7