るりまサーチ

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

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_bind
  3. etc sc_2_c_dev
  4. tracer display_c_call
  5. tracer display_c_call=

ライブラリ

キーワード

検索結果

TracePoint#eval_script -> String | nil (6203.0)

script_compiledイベント発生時にコンパイルされたソースコードを返します。 ファイルから読み込んだ場合は、nilを返します。

...script_compiledイベント発生時にコンパイルされたソースコードを返します。
ファイルから読み込んだ場合は、nilを返します。

//emlist[例][ruby]{
TracePoint
.new(:script_compiled) do |tp|
p tp.eval_script # => "puts 'hello'"
end.enable do
eval("puts 'he...
...llo'")
end
//}

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

TracePoint#inspect -> String (6203.0)

self の状態を人間に読みやすい文字列にして返します。

...self の状態を人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace.enable
foo 1
//}...

TracePoint#path -> String (3103.0)

イベントが発生したファイルのパスを返します。

...トが発生したファイルのパスを返します。

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

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//}...