summaryrefslogtreecommitdiff
path: root/lib/rubygems/installer.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-06 02:59:36 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-06 02:59:36 +0000
commit9b9d3bac4d5fb0d0287b898885a2e6f1125f807c (patch)
treeaad6503711a1179f86564e8303a34af258e8c975 /lib/rubygems/installer.rb
parent39cb7840950e87a4a77f066fd07dac6bb2e0b41c (diff)
* lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05 https://bugs.ruby-lang.org/issues/9489 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r--lib/rubygems/installer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index f8eb2c2145..c80981682f 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -480,7 +480,7 @@ class Gem::Installer
#
def shebang(bin_file_name)
- ruby_name = Gem::ConfigMap[:ruby_install_name] if @env_shebang
+ ruby_name = RbConfig::CONFIG['ruby_install_name'] if @env_shebang
path = File.join gem_dir, spec.bindir, bin_file_name
first_line = File.open(path, "rb") {|file| file.gets}
@@ -493,7 +493,7 @@ class Gem::Installer
if which = Gem.configuration[:custom_shebang]
# replace bin_file_name with "ruby" to avoid endless loops
- which = which.gsub(/ #{bin_file_name}$/," #{Gem::ConfigMap[:ruby_install_name]}")
+ which = which.gsub(/ #{bin_file_name}$/," #{RbConfig::CONFIG['ruby_install_name']}")
which = which.gsub(/\$(\w+)/) do
case $1
@@ -641,7 +641,7 @@ version = "#{Gem::Requirement.default}"
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