ruby-changes:65250
From: Nobuyoshi <ko1@a...>
Date: Sun, 14 Feb 2021 11:07:04 +0900 (JST)
Subject: [ruby-changes:65250] 31f4dec637 (master): Refined installation of gemspecs placed other than ext and lib
https://git.ruby-lang.org/ruby.git/commit/?id=31f4dec637 From 31f4dec6373c15a58899f8b86e35d48a7d813bf6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 14 Feb 2021 11:05:23 +0900 Subject: Refined installation of gemspecs placed other than ext and lib --- tool/rbinstall.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index fece0c6..9f6c1c7 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -701,14 +701,15 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L701 when "lib" base = @base_dir prefix = base.sub(/lib\/.*?\z/, "") + "lib/" + else + # other/something.gemspec -> + # [other/something.rb, other/something/foo.rb, ...] + base = @gemspec.chomp('.gemspec') + prefix = @base_dir end - if base - Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source| - remove_prefix(prefix, ruby_source) - end - else - [File.basename(@gemspec, '.gemspec') + '.rb'] + Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source| + remove_prefix(prefix, ruby_source) end end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/