るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. argf.class lines
  2. argf.class each_line
  3. argf.class each
  4. argf.class to_a
  5. argf.class gets

ライブラリ

検索結果

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