summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-07 23:57:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-07 23:57:31 +0900
commit05e1d87e625d9903d53e13049d69848924aecd28 (patch)
tree7758117fb807d8dfdcc5550a11bcc043316f0265 /tool
parent91f831ac17c8ff58d536ce1fa320294bb477d2ae (diff)
rbinstall.rb: do not install useless files after installed
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index ed883f6085..b49d91fc3f 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -879,7 +879,6 @@ def load_gemspec(file, expanded = false)
if expanded
base = File.dirname(file)
Dir.glob("**/*", File::FNM_DOTMATCH, base: base) do |n|
- next if n.start_with?(".git") # git related files are useless
case File.basename(n); when ".", ".."; next; end
next if File.directory?(File.join(base, n))
files << n.dump
@@ -892,6 +891,7 @@ def load_gemspec(file, expanded = false)
raise TypeError, "[#{file}] isn't a Gem::Specification (#{spec.class} instead)."
end
spec.loaded_from = file
+ spec.files.reject! {|n| n.end_with?(".gemspec") or n.start_with?(".git")}
spec
end