diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-17 14:27:00 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-17 14:27:00 +0000 |
commit | b28cb4fa85e141970457a2e9f9411d55a2e13bf6 (patch) | |
tree | 18407178872dcb61b58aa37ca5e4fb351033a5d6 /test/rubygems | |
parent | 8ff247aee71e590e05b0c85a352b0af66aa97578 (diff) |
merge revision(s) 39579: [Backport #7991]
* lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
fix for unusal cases again. install to a temporary directory once
and move instaled files to the destination directory, if it is same
as the current directory. [Bug #7698]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 1ef68888a3..60c450957d 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1001,7 +1001,17 @@ load Gem.bin_path('a', 'executable', version) RUBY end + Dir.mkdir(File.join("lib", @spec.name)) + rb2 = File.join("lib", @spec.name, "#{@spec.name}.rb") + @spec.files << rb2 + write_file File.join(@tempdir, rb2) do |io| + io.write <<-RUBY + # #{@spec.name}/#{@spec.name}.rb + RUBY + end + assert !File.exist?(File.join(@spec.gem_dir, rb)) + assert !File.exist?(File.join(@spec.gem_dir, rb2)) use_ui @ui do path = Gem::Package.build @spec @@ -1009,6 +1019,7 @@ load Gem.bin_path('a', 'executable', version) @installer.install end assert File.exist?(File.join(@spec.gem_dir, rb)) + assert File.exist?(File.join(@spec.gem_dir, rb2)) end def test_install_extension_flat |