From ddcf400fb5847e3305db6db91b2ff9c3f89c9192 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 6 Feb 2026 18:05:26 +0900 Subject: [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 --- spec/bundler/commands/clean_spec.rb | 2 -- 1 file changed, 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" -- cgit v1.2.3