るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.083秒)

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. cgi path_separator

ライブラリ

クラス

検索結果

Proc#source_location -> [String, Integer] | nil (18269.0)

ソースコードのファイル名と行番号を配列で返します。

...by]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method
(:p).to_proc.source_location # => nil
//}

@
see Method#source_location...