Ruby 3.1 リファレンスマニュアル > ライブラリ一覧 > rubygemsライブラリ > Gemモジュール > dir
dir -> String
Gem のインストールされているディレクトリを返します。