Skip to content

Commit

Permalink
Fixed installing gems with extensions under -V
Browse files Browse the repository at this point in the history
Commit f815636 changed the return value of ExtConfBuilder#build to nil
from the input result array.  When running with -V RubyGems prints the
results of compilation by joining the returned Array.  nil does not have
this so a NoMethodError was raised.

Fixes #601
  • Loading branch information
drbrain committed Sep 5, 2013
1 parent cf0f002 commit f3f99fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/rubygems/ext/ext_conf_builder.rb
Expand Up @@ -48,14 +48,14 @@ def self.build(extension, directory, dest_path, results)
destent.exist? or File.rename(ent.path, destent.path)
end
end

results
ensure
ENV["RUBYOPT"] = rubyopt
ENV["DESTDIR"] = destdir
end
end
t.unlink if t and t.path

results
ensure
FileUtils.rm_rf tmp_dest if tmp_dest
end
Expand Down
5 changes: 4 additions & 1 deletion test/rubygems/test_gem_ext_ext_conf_builder.rb
Expand Up @@ -27,7 +27,10 @@ def test_class_build
output = []

Dir.chdir @ext do
Gem::Ext::ExtConfBuilder.build 'extconf.rb', nil, @dest_path, output
result =
Gem::Ext::ExtConfBuilder.build 'extconf.rb', nil, @dest_path, output

assert_same result, output
end

assert_match(/^#{Gem.ruby} extconf.rb/, output[0])
Expand Down

0 comments on commit f3f99fc

Please sign in to comment.