るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.099秒)
トップページ > クエリ:Kernel.#p[x] > クエリ:exception[x] > クエリ:lambda[x] > クエリ:cpp_command[x] > クエリ:sample[x] > クラス:LoadError[x]

別のキーワード

  1. _builtin exception
  2. exception exception
  3. bigdecimal exception_all
  4. bigdecimal exception_zerodivide
  5. thread abort_on_exception

ライブラリ

検索結果

LoadError#path -> String | nil (6133.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 を返します。...