るりまサーチ

最速Rubyリファレンスマニュアル検索!
296件ヒット [201-296件を表示] (0.020秒)

別のキーワード

  1. tracepoint enable
  2. tracepoint disable
  3. _builtin tracepoint
  4. tracepoint path

ライブラリ

クラス

検索結果

<< < 1 2 3 >>

TracePoint#raised_exception -> Exception (12018.0)

発生した例外を返します。

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

//emlist[例][ruby]{
trace
= TracePoint.new(:raise) do |tp|
tp.raised_exception # => #<ZeroDivisionError: divided by 0>
end
trace
.enable
begin
0/0
rescue
end
//}...

TracePoint#return_value -> object (12018.0)

メソッドやブロックの戻り値を返します。

...timeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。

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

TracePoint#enabled? -> bool (12012.0)

self のトレースが有効な場合に true を、そうでない場合に false を返しま す。

...self のトレースが有効な場合に true を、そうでない場合に false を返しま
す。


@see TracePoint#enable, TracePoint#disable...

TracePoint#self -> object (12012.0)

イベントを発生させたオブジェクトを返します。

...イベントを発生させたオブジェクトを返します。

以下のようにする事で同じ値を取得できます。


//emlist[例][ruby]{
trace
.binding.eval('self')
//}

@see TracePoint#binding...
...返します。

以下のようにする事で同じ値を取得できます。

なお、self メソッドは binding が nil になる :c_call および :c_return イベントに対しても正しく動作します。

//emlist[例][ruby]{
trace
.binding.eval('self')
//}

@see TracePoint#binding...

TracePoint#eval_script -> String | nil (12006.0)

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

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

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

@raise RuntimeError :script_co...

絞り込み条件を変える

TracePoint#instruction_sequence -> RubyVM::InstructionSequence (12006.0)

script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。

...pt_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。

//emlist[例][ruby]{
TracePoint
.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("put...

TracePoint#parameters -> [object] (12006.0)

現在のフックが属するメソッドまたはブロックのパラメータ定義を返します。 フォーマットは Method#parameters と同じです。

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

//emlist[例][ruby]{
def foo(a, b = 2)
end
TracePoint
.new(:call) do |tp|
p tp.parameters # => a], [:opt, :b
end.enable do
foo(1)
end
//}

@see Method#parameters, UnboundMethod#parameters, Proc#...

NEWS for Ruby 3.1.0 (36.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...read_id が追加されました。 17853

* Thread::Backtrace
* 新規メソッド
* --backtrace-limit コマンドラインオプションで設定したバックトレースの長さを制限する値を返す Thread::Backtrace.limit が追加されました。 17479

* Thread::Queu...
...t local timeに対応しました。 -0000 を \%-z としてサポートします。 17544

* TracePoint
* 新規メソッド
* TracePoint のコールバック中に再入を許す TracePoint.allow_reentry が追加されました。 15912

* $LOAD_PATH
* 変更されたメソッ...
...matrix 0.4.2
* prime 0.1.2
* debug 1.4.0
* 以下が標準添付ライブラリから削除されました。
* dbm
* gdbm
* tracer

* Coverageの計測が一時停止をサポートされるようになりました。 Coverage.suspendで計測を一時停止し、Coverage.r...

NEWS for Ruby 2.1.0 (30.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...に対応している

* objspace
* 追加: ObjectSpace.#trace_object_allocations
* 追加: ObjectSpace.#trace_object_allocations_start
* 追加: ObjectSpace.#trace_object_allocations_stop
* 追加: ObjectSpace.#trace_object_allocations_clear
* 追加: ObjectSpace.#allocation_s...
...ックのプロファイルのために現在のRubyのスタックに
低コストでアクセスする機能を提供します。

* rb_tracepoint_new() C言語からアクセス可能な新しい内部的なイベントをサポートしました:
* RUBY_INTERNAL_EVENT_NEWOBJ
* RUBY...

NEWS for Ruby 2.5.0 (18.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...code character properties

* RubyVM::InstructionSequence
* RubyVM::InstructionSequence#each_child を追加
* RubyVM::InstructionSequence#trace_points を追加

* String
* String#-@ はフリーズされていない文字列の重複を排除します。
互換性のため、...
...ion というテクニックでブロックをメソッドの引数として渡したときの性能が向上しました
14045

* TracePointのためにtrace命令の変わりに命令の動的書き換えを使用するようにしました
14104

* ERB がテンプレートから生...

絞り込み条件を変える

NEWS for Ruby 2.0.0 (12.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...andling of exceptions
* 追加: Thread#backtrace_locations Kernel#caller_locations に似た情報を返します
* 新規クラス: Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
Kernel#caller_locations...
...させます

* Time
* 返り値変更:
* Time#to_s now returns US-ASCII encoding instead of BINARY.

* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.

* toplevel
* added method:
* added main.define_m...
<< < 1 2 3 >>