diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-01 11:40:46 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-01 11:40:46 +0000 |
commit | 708a10d35bf7d34da574ca3f2ae6be4bfffd5267 (patch) | |
tree | d2c623b0217bdd93ce8d3b9471b2235b36588bf2 /lib/rubygems/installer.rb | |
parent | abb8b330114e9079eca14b6f73e4c6109e4308b4 (diff) | |
download | ruby-708a10d35bf7d34da574ca3f2ae6be4bfffd5267.tar.gz |
Merge rubygems-2.6.12 from rubygems/rubygems.
* Details of changes:
https://github.com/rubygems/rubygems/blob/009080040279282d7b8ddd09acab41719cb4ba00/History.txt#L3
* I kept ko1's commmit related thread issue. It's not merged 2.6 branch on rubygems.
https://github.com/ruby/ruby/commit/1721dfa0ea963a85d4ac1e3415eb18ef427d4d36
* I removed test_realworld_default_gem from rubygems-2.6.12. It fails on
Ruby trunk. Because it's differences of test suite and environment.
https://github.com/rubygems/rubygems/pull/1899
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r-- | lib/rubygems/installer.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index f4d3e728de..967543c2d1 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -214,7 +214,7 @@ class Gem::Installer ruby_executable = true existing = io.read.slice(%r{ - ^( + ^\s*( gem \s | load \s Gem\.bin_path\( | load \s Gem\.activate_bin_path\( @@ -701,6 +701,8 @@ class Gem::Installer # Return the text for an application file. def app_script_text(bin_file_name) + # note that the `load` lines cannot be indented, as old RG versions match + # against the beginning of the line return <<-TEXT #{shebang bin_file_name} # @@ -723,7 +725,12 @@ if ARGV.first end end +if Gem.respond_to?(:activate_bin_path) load Gem.activate_bin_path('#{spec.name}', '#{bin_file_name}', version) +else +gem #{spec.name.dump}, version +load Gem.bin_path(#{spec.name.dump}, #{bin_file_name.dump}, version) +end TEXT end |