summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2026-02-06 18:05:26 +0900
committergit <svn-admin@ruby-lang.org>2026-02-09 00:08:11 +0000
commitddcf400fb5847e3305db6db91b2ff9c3f89c9192 (patch)
tree11e5519b09d7286e8480e26d01851c01977c7c1c
parent696087d1ef12ad23adef34a03b6f3dc6122d80b5 (diff)
[ruby/rubygems] Do not create unnecessary directories
The method `Spec::Path#vendored_gems` creates the directory containing the path. It makes no sense to create a directory with the same name as its basename in the current working directory. https://github.com/ruby/rubygems/commit/725f4ff2f4
-rw-r--r--spec/bundler/commands/clean_spec.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb
index 793aacf5c2..81209388ae 100644
--- a/spec/bundler/commands/clean_spec.rb
+++ b/spec/bundler/commands/clean_spec.rb
@@ -913,12 +913,10 @@ RSpec.describe "bundle clean" do
# Simulate that the locked bundler version is installed in the bundle path
# by creating the gem directory and gemspec (as would happen after bundle install with that version)
Pathname(vendored_gems("cache/bundler-#{version}.gem")).tap do |path|
- path.basename.mkpath
FileUtils.touch(path)
end
FileUtils.touch(vendored_gems("gems/bundler-#{version}"))
Pathname(vendored_gems("specifications/bundler-#{version}.gemspec")).tap do |path|
- path.basename.mkpath
path.write(<<~GEMSPEC)
Gem::Specification.new do |s|
s.name = "bundler"