summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2023-02-04 15:29:59 +0900
committergit <svn-admin@ruby-lang.org>2023-02-06 16:19:46 +0000
commitcab8c11611d94adaa86d9ed8322dd372922f94bc (patch)
treeefb072ff04779767216bbc56999854fddbfab6e0
parent77bec15c937a98d4d863c4a857d5619b41e529f1 (diff)
[rubygems/rubygems] Properly exclude gemspec file itself from gem
by comparing the file names with full path. Follows up https://github.com/rubygems/rubygems/commit/f444478eaccf https://github.com/rubygems/rubygems/commit/9637a82d2e
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index e35a121245..69c86ea27b 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
+ (File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
end
end
spec.bindir = "exe"