From 079eb70692fcda9b4bcf572319434ffa7f9e9849 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Jun 2011 07:19:22 +0000 Subject: allow multiline comments in config.ru This matches the latest Rack behavior. We can't just use Rack::Builder.parse_file because our option parser logic is slightly different and incompatible. ref: rack commit d31cf2b7c0c77c04510c08d95776315ceb24ba54 --- lib/unicorn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 9a5eb6f..2849ffc 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -41,7 +41,7 @@ module Unicorn when /\.ru$/ raw = File.read(ru) raw.sub!(/^__END__\n.*/, '') - eval("Rack::Builder.new {(#{raw}\n)}.to_app", TOPLEVEL_BINDING, ru) + eval("Rack::Builder.new {(\n#{raw}\n)}.to_app", TOPLEVEL_BINDING, ru) else require ru Object.const_get(File.basename(ru, '.rb').capitalize) -- cgit v1.2.3-24-ge0c7