summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-19 18:19:09 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-04-19 18:19:09 +0900
commit93420d34aaf8c30f11a66dd08eb186da922c831d (patch)
tree7d5634b31ef08462f1e03163239319a0c396a416
parent39c01aef66796897d7eff7b2f7904018e5a28ac3 (diff)
Added the specific files to the default gems like net-http and optparse
-rwxr-xr-xtool/rbinstall.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index abeae88193..141b67097b 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -710,13 +710,22 @@ module RbInstall
end
end
- if base
- Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
- remove_prefix(prefix, ruby_source)
- end
- else
- [File.basename(@gemspec, '.gemspec') + '.rb']
+ files = if base
+ Dir.glob("#{base}{.rb,/**/*.rb}").collect do |ruby_source|
+ remove_prefix(prefix, ruby_source)
+ end
+ else
+ [File.basename(@gemspec, '.gemspec') + '.rb']
+ end
+
+ case Pathname.new(@gemspec).basename(".gemspec").to_s
+ when "net-http"
+ files << "lib/net/https.rb"
+ when "optparse"
+ files << "lib/optionparser.rb"
end
+
+ files
end
def built_libraries