るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.034秒)
トップページ > クエリ:path[x] > クエリ:require[x] > クラス:LoadError[x] > バージョン:3.2[x]

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pstore path

ライブラリ

検索結果

LoadError#path -> String | nil (54391.0)

Kernel.#require や Kernel.#load に失敗したパスを返します。

...Kernel.#require や Kernel.#load に失敗したパスを返します。

begin
require 'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end

パスが定まらない場合は nil を返します。...