`Dir.chdir("~/filename")`などで`~`が展開されるか否かの記述があった方がよい。
hyuki opened this issue · comments
Hiroshi Yuki / 結城浩 commented
https://docs.ruby-lang.org/ja/latest/method/Dir/s/chdir.html
Dir.chdir("~/filename")
などで~
が展開されるか否かの記述があった方がよい。
Ruby 3.0.2では展開されないようだ。
Dir.chdir(File.expand_path("~/filename"))
とすれば展開できる。