るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.084秒)
トップページ > クエリ:>[x] > 種類:インスタンスメソッド[x] > クエリ:method[x] > クラス:Proc[x] > クエリ:source_location[x]

別のキーワード

  1. _builtin define_method
  2. irb/input-method new
  3. irb/input-method gets
  4. irb/input-method encoding
  5. irb/input-method readable_atfer_eof?

ライブラリ

検索結果

Proc#source_location -> [String, Integer] | nil (18245.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...