mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix the wrong file detection for net-*.gemspec
[Bug #17476][ruby-core:101724]
This commit is contained in:
parent
aae812d65d
commit
5d710d7e41
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,7 @@ require 'fileutils'
|
|||
require 'shellwords'
|
||||
require 'optparse'
|
||||
require 'optparse/shellwords'
|
||||
require 'pathname'
|
||||
require 'rubygems'
|
||||
begin
|
||||
require "zlib"
|
||||
|
@ -703,6 +704,10 @@ module RbInstall
|
|||
when "lib"
|
||||
base = @base_dir
|
||||
prefix = base.sub(/lib\/.*?\z/, "")
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue