Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider to make the Gem.default_path more static #7196

Open
voxik opened this issue Nov 27, 2023 · 0 comments
Open

Consider to make the Gem.default_path more static #7196

voxik opened this issue Nov 27, 2023 · 0 comments
Assignees
Labels

Comments

@voxik
Copy link
Contributor

voxik commented Nov 27, 2023

The current implementation of Gem.default_path is quite dynamic:

def self.default_path
path = []
path << user_dir if user_home && File.exist?(user_home)
path << default_dir
path << vendor_dir if vendor_dir && File.directory?(vendor_dir)
path
end

It does not include user_dir and vendor_dir under some conditions, mainly if the directories are not present on the filesystem. That IMHO makes information about versatility of RubyGems more obscure.

Therefore I propose to make the Gem.default_path more static, starting by removing the directory existence check.

Please note that this ticket is based on discussion in #7187 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants