aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 16:22:27 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 17:06:36 +0900
commit7664b5cb6549d09935c4bf0fe67392708a9c19c2 (patch)
treecd35cae6184b9856e9891ae80487892796931471 /lib/rubygems
parent221ba9b66c022a99227de8bf21db618666e17c42 (diff)
downloadruby-7664b5cb6549d09935c4bf0fe67392708a9c19c2.tar.gz
Support the current stable version of Ruby like 2.5 and 2.6.
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/installer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index e6f1b9243d..9481bd2b81 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -357,7 +357,7 @@ class Gem::Installer
def run_pre_install_hooks # :nodoc:
Gem.pre_install_hooks.each do |hook|
if hook.call(self) == false
- location = " at #{$1}" if hook.inspect =~ / (.*:\d+)/
+ location = " at #{$1}" if hook.inspect =~ /[ @](.*:\d+)/
message = "pre-install hook#{location} failed for #{spec.full_name}"
raise Gem::InstallError, message
@@ -370,7 +370,7 @@ class Gem::Installer
if hook.call(self) == false
FileUtils.rm_rf gem_dir
- location = " at #{$1}" if hook.inspect =~ / (.*:\d+)/
+ location = " at #{$1}" if hook.inspect =~ /[ @](.*:\d+)/
message = "post-build hook#{location} failed for #{spec.full_name}"
raise Gem::InstallError, message