るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

検索結果

Binding#source_location -> [String, Integer] (24247.0)

self の Ruby のソースファイル名と行番号を返します。

...
self
Ruby のソースファイル名と行番号を返します。

d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。

//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}...