From 22ee44c517532547c518975ed84637f2e4198648 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Tue, 5 Feb 2013 16:47:18 -0800 Subject: [PATCH] Detect -Ilib and use on restart --- lib/puma/cli.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index 8845d141..d5ae9d45 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -83,6 +83,10 @@ module Puma arg0 = [Gem.ruby, "-S", $0] end + # Detect and reinject -Ilib from the command line + lib = File.expand_path "lib" + arg0[1,0] = ["-I", lib] if $:[0] == lib + @restart_argv = arg0 + ARGV end end