From fc56b96b09e477686975c978142e3af9179219cd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 14 Feb 2021 13:20:22 +0900 Subject: [PATCH] Fix gemspec only case --- tool/rbinstall.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 9f6c1c76a8..8790268476 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -708,9 +708,14 @@ module RbInstall prefix = @base_dir end - Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source| + libs = Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source| remove_prefix(prefix, ruby_source) end + if libs.empty? + [File.basename(@gemspec, '.gemspec') + '.rb'] + else + libs + end end def built_libraries