diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-28 08:31:28 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-28 08:31:28 +0000 |
commit | c5da5b1ea27ec693dd09e9d586e913da1d5ba4b6 (patch) | |
tree | 8624c192a757d272b5ebae46dd9691b7994da0c5 /lib/rubygems/installer.rb | |
parent | 1a1930180c66b291c89d486b984f8bf5237d6918 (diff) | |
download | ruby-c5da5b1ea27ec693dd09e9d586e913da1d5ba4b6.tar.gz |
Merge rubygems-2.6.13.
see details for this update:
http://blog.rubygems.org/2017/08/27/2.6.13-released.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/installer.rb')
-rw-r--r-- | lib/rubygems/installer.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 967543c2d1..6fd3399dd4 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -697,6 +697,11 @@ class Gem::Installer unpack or File.writable?(gem_home) end + def verify_spec_name + return if spec.name =~ Gem::Specification::VALID_NAME_PATTERN + raise Gem::InstallError, "#{spec} has an invalid name" + end + ## # Return the text for an application file. @@ -823,6 +828,8 @@ TEXT ensure_loadable_spec + verify_spec_name + if options[:install_as_default] Gem.ensure_default_gem_subdirectories gem_home else |