Skip to content

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

Merged
hsbt merged 1 commit into
ruby:masterfrom
pvdb:use_dir_home
May 30, 2025
Merged

refactor: use Dir.home to find rake's standard system dir#608
hsbt merged 1 commit into
ruby:masterfrom
pvdb:use_dir_home

Conversation

@pvdb

@pvdbpvdb commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

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! 🙏

@pvdbpvdb changed the title Use more idiomatic Dir.home to find rake's standard system dirrefactor: use Dir.home to find rake's standard system dirDec 19, 2024
@hsbt

hsbt commented May 30, 2025

Copy link
Copy Markdown
Member

👍 Thanks!

@hsbt
hsbt merged commit a4454e6 into ruby:masterMay 30, 2025
@pvdb
pvdb deleted the use_dir_home branch May 31, 2025 08:13
Sign up for freeto 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

@pvdb@hsbt