diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-14 13:20:22 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-14 13:20:22 +0900 |
commit | fc56b96b09e477686975c978142e3af9179219cd (patch) | |
tree | 2fffad0ea8ac308090e0034f1831a90e0d21f0ea /tool | |
parent | 07a8f09b9f3e4ca0852633eb234115d84fb69fb7 (diff) | |
download | ruby-fc56b96b09e477686975c978142e3af9179219cd.tar.gz |
Fix gemspec only case
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 7 |
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 |