10000 refactor: use `Dir.home` to find `rake`'s standard system dir by pvdb · Pull Request #608 · ruby/rake · GitHub
[go: up one dir, main page]

Skip to content

refactor: use Dir.home to find rake's standard system dir #608

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

pvdb
Copy link
Contributor
@pvdb pvdb commented Dec 19, 2024

Hot on the heels of the changes in #591, this PR proposes a further simplification of Rake::Application.standard_system_dir() by using Dir.home() instead of File.expand_path("~")

As discussed here:

https://bugs.ruby-lang.org/issues/1027

... this is a much more idiomatic way to determine the home directory of the current user, and has been part of Ruby since 2009 (ruby 1.9.2).

Thanks, @hsbt! 🙏

@pvdb pvdb changed the title Use more idiomatic Dir.home to find rake's standard system dir refactor: use Dir.home to find rake's standard system dir Dec 19, 2024
@hsbt
Copy link
Member
hsbt commented May 30, 2025

👍 Thanks!

@hsbt hsbt merged commit a4454e6 into ruby:master May 30, 2025
28 checks passed
@pvdb pvdb deleted the use_dir_home branch May 31, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0