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

module function Gem.#dir

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

Gem のインストールされているディレクトリを返します。