[前][次][番号順一覧][スレッド一覧]

ruby-changes:65888

From: Hiroshi <ko1@a...>
Date: Mon, 19 Apr 2021 13:45:48 +0900 (JST)
Subject: [ruby-changes:65888] 5d710d7e41 (master): Fix the wrong file detection for net-*.gemspec

https://git.ruby-lang.org/ruby.git/commit/?id=5d710d7e41

From 5d710d7e41ef3a9877426c87de121be3bf770e34 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Mon, 19 Apr 2021 13:44:38 +0900
Subject: Fix the wrong file detection for net-*.gemspec

[Bug #17476][ruby-core:101724]
---
 tool/rbinstall.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 66686eb..abeae88 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -22,6 +22,7 @@ require 'fileutils' https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L22
 require 'shellwords'
 require 'optparse'
 require 'optparse/shellwords'
+require 'pathname'
 require 'rubygems'
 begin
   require "zlib"
@@ -703,6 +704,10 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L704
         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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]