diff options
author | nagachika <nagachika@ruby-lang.org> | 2021-07-03 11:38:10 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-07-03 11:38:10 +0900 |
commit | 934001fb08ef133b2925f1651f36f83ddcd2f46d (patch) | |
tree | 5939978a2256551905e50408425cf20664eac38d /tool | |
parent | f0a1c063490d69f0868876deed74ad52db63cf4b (diff) |
merge revision(s) 5d710d7e41ef3a9877426c87de121be3bf770e34: [Backport #17476]
Fix the wrong file detection for net-*.gemspec
[Bug #17476][ruby-core:101724]
---
tool/rbinstall.rb | 5 +++++
1 file changed, 5 insertions(+)
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b49d91fc3f..7232865c9e 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -20,6 +20,7 @@ require 'fileutils' require 'shellwords' require 'optparse' require 'optparse/shellwords' +require 'pathname' require 'rubygems' begin require "zlib" @@ -701,6 +702,10 @@ module RbInstall when "lib" base = @base_dir prefix = base.sub(/lib\/.*?\z/, "") + "lib/" + # for lib/net/net-smtp.gemspec + if m = Pathname.new(@gemspec).basename(".gemspec").to_s.match(/.*\-(.*)\z/) + base = "#{@base_dir}/#{m[1]}" unless remove_prefix(prefix, @base_dir).include?(m[1]) + end end if base |