Ruby 4.0 リファレンスマニュアル

instance method Etc::Passwd#dir

dir -> StringRuby 2.5.0 から[permalink][rdoc][edit]

このユーザのホームディレクトリを表すパスを返します。