るりまサーチ

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

別のキーワード

  1. _builtin lineno
  2. csv lineno
  3. stringio lineno
  4. ripper lineno
  5. stringio lineno=

ライブラリ

検索結果

TracePoint#lineno -> Integer (18115.0)

発生したイベントの行番号を返します。

...発生したイベントの行番号を返します。

@raise RuntimeError イベントフックの外側で実行した場合に発生します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call, :return) do |tp|
tp.lineno
end
trace.enable
foo 1
# => 1
# 3
//}...