1
0
Fork 0
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:
nobu 2013-03-02 16:16:19 +00:00
parent c0c72c9ba1
commit 9b79ed1292
4 changed files with 12 additions and 6 deletions

View file

@ -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