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/app/exec_cgi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicorn/app') diff --git a/lib/unicorn/app/exec_cgi.rb b/lib/unicorn/app/exec_cgi.rb index 2262e4c..ef2a18e 100644 --- a/lib/unicorn/app/exec_cgi.rb +++ b/lib/unicorn/app/exec_cgi.rb @@ -36,7 +36,7 @@ module Unicorn::App self.args = args first = args[0] or raise ArgumentError, "need path to executable" - first[0..0] == "/" or args[0] = ::File.expand_path(first) + first[0] == ?/ or args[0] = ::File.expand_path(first) File.executable?(args[0]) or raise ArgumentError, "#{args[0]} is not executable" end -- cgit v1.2.3-24-ge0c7