summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-02 16:16:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-02 16:16:19 +0000
commit9b79ed12928174fa1b36d5aaa198f3de7edfd02f (patch)
tree5b7ce89f6086c8160e85e08589dd32a6dd683f35 /lib/rubygems/ext
parentc0c72c9ba1e2492999664d6b0335dd7d3ae43bb6 (diff)
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
Diffstat (limited to 'lib/rubygems/ext')
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index eaf5e607a6..e11a1cdfbc 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -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