* test/ruby/envutil.rb (EnvUtil#rubybin): fake also rbconfig.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6b81a6b6e
commit
8f3f9d715f
@ -20,10 +20,9 @@ module EnvUtil
|
|||||||
end
|
end
|
||||||
ruby = File.join("..", ruby)
|
ruby = File.join("..", ruby)
|
||||||
end
|
end
|
||||||
begin
|
if defined?(RbConfig.ruby)
|
||||||
require "rbconfig"
|
|
||||||
RbConfig.ruby
|
RbConfig.ruby
|
||||||
rescue LoadError
|
else
|
||||||
"ruby"
|
"ruby"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -202,3 +201,20 @@ module Test
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'rbconfig'
|
||||||
|
rescue LoadError
|
||||||
|
else
|
||||||
|
module RbConfig
|
||||||
|
@ruby = EnvUtil.rubybin
|
||||||
|
class << self
|
||||||
|
undef ruby if defined?(ruby)
|
||||||
|
attr_reader :ruby
|
||||||
|
end
|
||||||
|
dir = File.dirname(ruby)
|
||||||
|
name = File.basename(ruby, CONFIG['EXEEXT'])
|
||||||
|
CONFIG['bindir'] = dir
|
||||||
|
CONFIG['ruby_install_name'] = name
|
||||||
|
CONFIG['RUBY_INSTALL_NAME'] = name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
require "test/unit"
|
require "test/unit"
|
||||||
|
require File.join(File.dirname(__FILE__), "utils.rb")
|
||||||
require "webrick"
|
require "webrick"
|
||||||
require "stringio"
|
require "stringio"
|
||||||
require File.join(File.dirname(__FILE__), "utils.rb")
|
|
||||||
|
|
||||||
class WEBrick::TestFileHandler < Test::Unit::TestCase
|
class WEBrick::TestFileHandler < Test::Unit::TestCase
|
||||||
def default_file_handler(filename)
|
def default_file_handler(filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user