11件ヒット
[1-11件を表示]
(0.070秒)
検索結果
-
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...