るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer rationalize
  5. integer upto

ライブラリ

検索結果

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

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

.../emlist[例][ruby]{
# /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#so...
...urce_location...