summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 13:20:22 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 13:20:22 +0900
commitfc56b96b09e477686975c978142e3af9179219cd (patch)
tree2fffad0ea8ac308090e0034f1831a90e0d21f0ea /tool/rbinstall.rb
parent07a8f09b9f3e4ca0852633eb234115d84fb69fb7 (diff)
downloadruby-fc56b96b09e477686975c978142e3af9179219cd.tar.gz
Fix gemspec only case
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb7
1 files changed, 6 insertions, 1 deletions
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