summaryrefslogtreecommitdiff
path: root/test/webrick/utils.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-18 13:56:09 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-18 13:56:09 +0000
commit26e9234309f79fa6bf358dc8b4087916c9488950 (patch)
treed9865b1d2e3ae693a6770dc8c5b66a3ea0102a8b /test/webrick/utils.rb
parent9d72f26584b3b996727d8e298fcd323fd703eaea (diff)
Overwrite Ruby's path for cgi in tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/utils.rb')
-rw-r--r--test/webrick/utils.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/webrick/utils.rb b/test/webrick/utils.rb
index 15852ca47d..10bd7a995b 100644
--- a/test/webrick/utils.rb
+++ b/test/webrick/utils.rb
@@ -13,6 +13,13 @@ module TestWEBrick
return self
end
+ class WEBrick::HTTPServlet::CGIHandler
+ remove_const :Ruby
+ Ruby = EnvUtil.rubybin
+ remove_const :CGIRunner
+ CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\"" # :nodoc:
+ end
+
RubyBin = "\"#{EnvUtil.rubybin}\""
RubyBin << " --disable-gems"
RubyBin << " \"-I#{File.expand_path("../..", File.dirname(__FILE__))}/lib\""