The following fails with
Errno::ENOENT: No such file or directory
$HOMEis a mere convention; indeed, if you look at the documentation for
File.expand_path, it correctly interprets the tilde, but it's a feature of the function itself, not something inherent to the underlying system; also,
$HOMEenvironment variable to be correctly set. Which bring us to the possible alternative...
I hope it's slick enough. I personally think using an environment variable is semantically clearer than using