diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-01 12:43:26 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-01 12:43:26 +0000 |
commit | a21d403f21473b21b5766c2483b4325240e9edda (patch) | |
tree | bd10197f9589251f35f0f9dc6fa387f0e298a6ef /lib/rubygems/installer.rb | |
parent | 94cfa2893ccab71341d4671201253339d56d6c97 (diff) | |
download | ruby-a21d403f21473b21b5766c2483b4325240e9edda.tar.gz |
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
It supports to enable frozen string literal and add `--norc` option for
disable to `.gemrc` configuration.
See 2.5.2 release notes for other fixes and enhancements.
https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r-- | lib/rubygems/installer.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 7b4979d7ca..85358e0d1a 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. # All rights reserved. @@ -213,7 +213,13 @@ class Gem::Installer next unless io.gets =~ /This file was generated by RubyGems/ ruby_executable = true - existing = io.read.slice(/^gem (['"])(.*?)(\1),/, 2) + existing = io.read.slice(%r{ + ^( + gem \s | + load \s Gem\.bin_path\( + ) + (['"])(.*?)(\2), + }x, 3) end return if spec.name == existing @@ -221,7 +227,7 @@ class Gem::Installer # somebody has written to RubyGems' directory, overwrite, too bad return if Gem.default_bindir != @bin_dir and not ruby_executable - question = "#{spec.name}'s executable \"#{filename}\" conflicts with " + question = "#{spec.name}'s executable \"#{filename}\" conflicts with ".dup if ruby_executable then question << existing @@ -297,7 +303,7 @@ class Gem::Installer write_cache_file end - say spec.post_install_message unless spec.post_install_message.nil? + say spec.post_install_message if options[:post_install_message] && !spec.post_install_message.nil? Gem::Installer.install_lock.synchronize { Gem::Specification.reset } @@ -627,7 +633,8 @@ class Gem::Installer :bin_dir => nil, :env_shebang => false, :force => false, - :only_install_dir => false + :only_install_dir => false, + :post_install_message => true }.merge options @env_shebang = options[:env_shebang] @@ -712,7 +719,6 @@ if ARGV.first end end -gem '#{spec.name}', version load Gem.bin_path('#{spec.name}', '#{bin_file_name}', version) TEXT end |