From 407724b49069ee539e9a918ce75e9d1290552471 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 30 Sep 2009 13:41:27 -0700 Subject: cleanup: use question mark op for 1-byte comparisons It's compatible with both Ruby 1.8 and 1.9 without needing a Range object. --- lib/unicorn/socket_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicorn/socket_helper.rb') diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb index e287955..f792562 100644 --- a/lib/unicorn/socket_helper.rb +++ b/lib/unicorn/socket_helper.rb @@ -76,7 +76,7 @@ module Unicorn def bind_listen(address = '0.0.0.0:8080', opt = {}) return address unless String === address - sock = if address[0..0] == "/" + sock = if address[0] == ?/ if File.exist?(address) if File.socket?(address) if self.respond_to?(:logger) -- cgit v1.2.3-24-ge0c7