diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-04-08 17:26:27 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-04-08 17:26:27 -0700 |
commit | 8054989137b84edfa6bf061f708716536dc05d59 (patch) | |
tree | b8aad3fbdfcff92e25fc0c66d5248b09b0cafc0a /bin/unicorn_rails | |
parent | e1a72d58add4260feb6da56d9d588270173da74f (diff) | |
download | unicorn-8054989137b84edfa6bf061f708716536dc05d59.tar.gz |
Do not assume the user wants config.ru to be Encoding::BINARY for 1.9. This is a followup to a4a8bf7604d1c15c5a8fb9cb6be37e8bccb32e52
Diffstat (limited to 'bin/unicorn_rails')
-rwxr-xr-x | bin/unicorn_rails | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/unicorn_rails b/bin/unicorn_rails index de2361e..7c4afec 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -146,7 +146,7 @@ def rails_builder(config, daemonize) ActionController::Dispatcher.new end when /\.ru$/ - raw = File.open(config, "rb") { |fp| fp.sysread(fp.stat.size) } + raw = File.read(config) raw.sub!(/^__END__\n.*/, '') eval("Rack::Builder.new {(#{raw}\n)}.to_app", TOPLEVEL_BINDING, config) else |