diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-04-18 17:40:29 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-10-28 11:06:17 +0000 |
| commit | 3afe8ed46f3cf71ae48703c5264d2d0712597a59 (patch) | |
| tree | 3a1f73f53f0e798d5e4d63a723ee669da07ea71a | |
| parent | 7bd7bcbf3e683e3d4d88696b72444e6c14685cc2 (diff) | |
[ruby/rubygems] Introduce default_spec_dir when it's not provided
https://github.com/ruby/rubygems/commit/e9bd59699c
| -rw-r--r-- | lib/rubygems/installer.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 46c4844ab9..52a352162e 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -398,12 +398,18 @@ class Gem::Installer File.join gem_home, "specifications", "#{spec.full_name}.gemspec" end + def default_spec_dir + dir = File.join(gem_home, "specifications", "default") + FileUtils.mkdir_p dir + dir + end + ## # The location of the default spec file for default gems. # def default_spec_file - File.join gem_home, "specifications", "default", "#{spec.full_name}.gemspec" + File.join default_spec_dir, "#{spec.full_name}.gemspec" end ## |
