mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext_conf_builder.rb: use RUBYOPT
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build): use RUBYOPT instead of -r option, and revert some tests. [Bug #7698] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c0c72c9ba1
commit
9b79ed1292
4 changed files with 12 additions and 6 deletions
|
@ -1,4 +1,7 @@
|
|||
Sun Mar 3 01:14:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sun Mar 3 01:16:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
|
||||
use RUBYOPT instead of -r option, and revert some tests. [Bug #7698]
|
||||
|
||||
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
|
||||
revert use of temporary directory for build, to work some buggy
|
||||
|
|
|
@ -22,7 +22,9 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|||
f
|
||||
end
|
||||
|
||||
cmd = [Gem.ruby, "-r#{siteconf.path}", File.basename(extension), *args].join ' '
|
||||
rubyopt = ENV["RUBYOPT"]
|
||||
ENV["RUBYOPT"] = ["-r#{siteconf.path}", rubyopt].compact.join(' ')
|
||||
cmd = [Gem.ruby, File.basename(extension), *args].join ' '
|
||||
|
||||
run cmd, results
|
||||
|
||||
|
@ -30,6 +32,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
|||
|
||||
results
|
||||
ensure
|
||||
ENV["RUBYOPT"] = rubyopt
|
||||
siteconf.close(true) if siteconf
|
||||
end
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase
|
|||
Gem::Ext::ExtConfBuilder.build 'extconf.rb', nil, @dest_path, output
|
||||
end
|
||||
|
||||
assert_match(/^#{Gem.ruby} .*extconf.rb/, output[0])
|
||||
assert_match(/^#{Gem.ruby} extconf.rb/, output[0])
|
||||
assert_equal "creating Makefile\n", output[1]
|
||||
case RUBY_PLATFORM
|
||||
when /mswin/ then
|
||||
|
@ -107,10 +107,10 @@ class TestGemExtExtConfBuilder < Gem::TestCase
|
|||
|
||||
assert_match(/\Aextconf failed:
|
||||
|
||||
#{Gem.ruby} .*extconf.rb.*
|
||||
#{Gem.ruby} extconf.rb.*
|
||||
checking for main\(\) in .*?nonexistent/m, error.message)
|
||||
|
||||
assert_match(/^#{Gem.ruby} .*extconf.rb/, output[0])
|
||||
assert_equal("#{Gem.ruby} extconf.rb", output[0])
|
||||
end
|
||||
|
||||
def test_class_make
|
||||
|
|
|
@ -81,7 +81,7 @@ load Gem.bin_path('a', 'executable', version)
|
|||
|
||||
gem_make_out = File.join @gemhome, 'gems', @spec.full_name, 'gem_make.out'
|
||||
|
||||
assert_match %r%#{Regexp.escape Gem.ruby} .*extconf\.rb%,
|
||||
assert_match %r%#{Regexp.escape Gem.ruby} extconf\.rb%,
|
||||
File.read(gem_make_out)
|
||||
assert_match %r%#{Regexp.escape Gem.ruby}: No such file%,
|
||||
File.read(gem_make_out)
|
||||
|
|
Loading…
Reference in a new issue