about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-24 07:19:22 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-24 07:23:35 +0000
commit079eb70692fcda9b4bcf572319434ffa7f9e9849 (patch)
tree8f6dadd94821c1a52d090d3956113307434082ee
parentb3b6b0dff19f8a22a96525bba22bf061d03c3fc5 (diff)
downloadunicorn-079eb70692fcda9b4bcf572319434ffa7f9e9849.tar.gz
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
-rw-r--r--lib/unicorn.rb2
1 files changed, 1 insertions, 1 deletions
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)