From ec8972dbe267dc0d21cd780c41f362a6580a4a89 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Mar 2009 13:24:52 -0700 Subject: Allow binding to UNIX sockets relative to "~" This is to be consistent with the existing "pid" and std{err,out}_path options which also take paths relative to "~" --- lib/unicorn/socket.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/unicorn/socket.rb b/lib/unicorn/socket.rb index 4913261..d8e44f4 100644 --- a/lib/unicorn/socket.rb +++ b/lib/unicorn/socket.rb @@ -75,6 +75,7 @@ module Unicorn def bind_listen(address = '0.0.0.0:8080', backlog = 1024) return address unless String === address + address = File.expand_path(address) if address[0..0] == "~" domain, bind_addr = if address[0..0] == "/" if File.exist?(address) if File.socket?(address) -- cgit v1.2.3-24-ge0c7