るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.070秒)
トップページ > クエリ:I[x] > クエリ:IO[x] > クエリ:-[x] > ライブラリ:ビルトイン[x] > クラス:Proc[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

検索結果

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

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

...nil を返します。


//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#source_location...