Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.ensure_gem_subdirectories
(?::String dir, ?::Integer | ::String mode) -> ::Array[::String]
ensure_gem_subdirectories(dir = Gem.dir, mode = nil)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems.rb, line 465
def self.ensure_gem_subdirectories(dir = Gem.dir, mode = nil)
ensure_subdirectories(dir, mode, REPOSITORY_SUBDIRECTORIES)
end
Quietly ensure the Gem directory dir contains all the proper subdirectories. If we can’t create a directory due to a permission problem, then we will silently continue.
If mode is given, missing directories are created with this mode.
World-writable directories will never be created.
See also
.ensure_default_gem_subdirectories
.env_requirement
.dynamic_library_suffixes
.find_and_activate_spec_for_exe
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0