summaryrefslogtreecommitdiff
path: root/lib/webrick/httpservlet/cgi_runner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/httpservlet/cgi_runner.rb')
-rw-r--r--lib/webrick/httpservlet/cgi_runner.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/webrick/httpservlet/cgi_runner.rb b/lib/webrick/httpservlet/cgi_runner.rb
index 1069a68..006abd4 100644
--- a/lib/webrick/httpservlet/cgi_runner.rb
+++ b/lib/webrick/httpservlet/cgi_runner.rb
@@ -39,7 +39,9 @@ dir = File::dirname(ENV["SCRIPT_FILENAME"])
Dir::chdir dir
if interpreter = ARGV[0]
- exec(interpreter, ENV["SCRIPT_FILENAME"])
+ argv = ARGV.dup
+ argv << ENV["SCRIPT_FILENAME"]
+ exec(*argv)
# NOTREACHED
end
exec ENV["SCRIPT_FILENAME"]