Skip to content

Commit f860b23

Browse files
nobuparacycle
authored andcommitted
[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. ruby/rubygems@725f4ff2f4
1 parent ac3bd0e commit f860b23

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

spec/bundler/commands/clean_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,12 +913,10 @@ def should_not_have_gems(*gems)
913913
# Simulate that the locked bundler version is installed in the bundle path
914914
# by creating the gem directory and gemspec (as would happen after bundle install with that version)
915915
Pathname(vendored_gems("cache/bundler-#{version}.gem")).tap do |path|
916-
path.basename.mkpath
917916
FileUtils.touch(path)
918917
end
919918
FileUtils.touch(vendored_gems("gems/bundler-#{version}"))
920919
Pathname(vendored_gems("specifications/bundler-#{version}.gemspec")).tap do |path|
921-
path.basename.mkpath
922920
path.write(<<~GEMSPEC)
923921
Gem::Specification.new do |s|
924922
s.name = "bundler"

0 commit comments

Comments
 (0)