るりまサーチ (Ruby 3.2)

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

別のキーワード

  1. socket open
  2. _builtin open
  3. csv open
  4. tempfile open
  5. zlib open

ライブラリ

検索結果

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