summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_installer.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 00:48:31 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 00:48:31 +0000
commitea2a00d785576a7dc45c0f6e965de605929e889d (patch)
tree567e52888b17aacb404c59eb64519d927fb8894f /test/rubygems/test_gem_installer.rb
parentbd950a75b512a7d6243d1f0bb5e944a06a2e1f94 (diff)
* lib/rubygems: Update to RubyGems 2.2.2 prerelease to check fixes to
CI. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_installer.rb')
-rw-r--r--test/rubygems/test_gem_installer.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 54ac853135..eff62ab28b 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -41,7 +41,7 @@ version = \">= 0\"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\\A_(.*)_\\z/
+ if str =~ /\\A_(.*)_\\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
@@ -102,7 +102,11 @@ load Gem.bin_path('a', 'executable', version)
ensure
Object.const_set :RUBY_FRAMEWORK_VERSION, orig_RUBY_FRAMEWORK_VERSION if
orig_RUBY_FRAMEWORK_VERSION
- RbConfig::CONFIG['bindir'] = orig_bindir
+ if orig_bindir then
+ RbConfig::CONFIG['bindir'] = orig_bindir
+ else
+ RbConfig::CONFIG.delete 'bindir'
+ end
end
def test_check_executable_overwrite_format_executable