mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 10:03:59 +02:00
merge revision(s) 39559: [Backport #7991]
* 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/branches/ruby_2_0_0@39789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d6aa9ba8b
commit
bbe8000821
4 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.0.0"
|
||||
#define RUBY_RELEASE_DATE "2013-03-17"
|
||||
#define RUBY_PATCHLEVEL 59
|
||||
#define RUBY_PATCHLEVEL 60
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2013
|
||||
#define RUBY_RELEASE_MONTH 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue