summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 16:49:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 16:57:08 +0900
commit504d6dc429f931d0ea45d1b0d969cd27476ff91b (patch)
tree0d2e74db222310839e965e9b49c4f9dbf4000faf /tool/rbinstall.rb
parentff527e7e3295ece6a8f2bc6a2370038615a43950 (diff)
downloadruby-504d6dc429f931d0ea45d1b0d969cd27476ff91b.tar.gz
Revert following rbinstall.rb changes
Because unexpected names are listed in gemspec files. * "Fix gemspec only case" fc56b96b09e477686975c978142e3af9179219cd * "Refined installation of gemspecs placed other than ext and lib" 31f4dec6373c15a58899f8b86e35d48a7d813bf6
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 56502f161a..debf73a7d2 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -701,20 +701,14 @@ module RbInstall
when "lib"
base = @base_dir
prefix = base.sub(/lib\/.*?\z/, "")
- else
- # other/something.gemspec ->
- # [other/something.rb, other/something/foo.rb, ...]
- base = @gemspec.chomp('.gemspec')
- prefix = @base_dir
end
- libs = Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
- remove_prefix(prefix, ruby_source)
- end
- if libs.empty?
- [File.basename(@gemspec, '.gemspec') + '.rb']
+ if base
+ Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
+ remove_prefix(prefix, ruby_source)
+ end
else
- libs
+ [File.basename(@gemspec, '.gemspec') + '.rb']
end
end