クラス
- Thread (22)
- TracePoint (11)
- Tracer (22)
モジュール
- Kernel (44)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) - TracePoint (11)
-
add
_ filter (22) -
add
_ trace _ func (11) - caller (33)
-
defined
_ class (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - tracer (11)
検索結果
先頭5件
-
static VALUE set
_ trace _ func(VALUE obj , VALUE trace) (38132.0) -
Kernel#set_trace_func の実体。 評価器に対するフック手続きを登録します。
...
Kernel#set_trace_func の実体。
評価器に対するフック手続きを登録します。... -
Kernel
. # set _ trace _ func(proc) -> Proc (27125.0) -
Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。
...オフにします。
@return proc を返します。
//emlist[例][ruby]{
set_trace_func lambda {|*arg|
p arg
}
class Foo
end
43.to_s
# ----結果----
# ["c-return", "..", 1, :set_trace_func, #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# ["c-call", "..", 4,......["class", "..", 4, nil, #<Binding:0x10cb600>, nil]
# ["end", "..", 5, nil, #<Binding:0x10cb3f0>, nil]
# ["line", "..", 6, nil, #<Binding:0x10cb1e0>, nil]
# ["c-call", "..", 6, :to_s, #<Binding:0x10cafd0>, Fixnum]
# ["c-return", "..", 6, :to_s, #<Binding:0x10cad78>, Fixnum]
//}
@see Kernel.#caller... -
Thread
# set _ trace _ func(pr) -> Proc | nil (18131.0) -
スレッドにトレース用ハンドラを設定します。
...したハンドラを返します。
//emlist[例][ruby]{
th = Thread.new do
class Trace
end
2.to_s
Thread.current.set_trace_func nil
3.to_s
end
th.set_trace_func lambda {|*arg| p arg }
th.join
# => ["line", "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
# => ["c-call", "examp......"c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>, Thread]
//}
@param pr トレースハンドラ(Proc オブジェクト) もしくは nil
@see Thread#add_trace_func Kernel.#set_trace_func... -
Kernel
. # caller(range) -> [String] | nil (9024.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
Kernel
. # caller(start = 1) -> [String] | nil (9024.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
Kernel
. # caller(start , length) -> [String] | nil (9024.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...します。
@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。
@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
de... -
NEWS for Ruby 2
. 0 . 0 (96.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ts
* Kernel
* 追加: Kernel.#Hash という変換メソッド。Kernel.#Array, Kernel.#Float に似ています
* 追加: Kernel.#__dir__ 現在のソースファイル(__FILE__)のあるディレクトリ名を正規化された絶対パ スで返します。
* 追加: Kernel.#calle......r_locations フレーム情報の配列を返します
* 拡張: Kernel.#warn Kernel.#puts のように複数の引数を受け付けるようになりました
* 拡張: Kernel.#caller 第2引数で取得するスタックのサイズを指定できるようになりました
* 拡張:......り値変更:
* 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_method which defines a global fun... -
ruby 1
. 8 . 4 feature (48.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...eature/組み込みライブラリ>))
* ((<ruby 1.8.4 feature/UnboundMethod#bind [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [bug]>))
* ((<ruby 1.8.4 feature/set_trace_func [change]>))
* ((<ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 featu......from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.
: super [bug]
Kernelのメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスしようとするバグの修正。
module Kernel......(NotImplementedError)
from -:10:in `initialize'
from -:14
# => ruby 1.8.4 (2005-12-16) [i686-linux]
: set_trace_func [bug]
#Thu Dec 8 00:40:52 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (call_trace_func): klass parameter should be a... -
TracePoint (32.0)
-
Kernel.#set_trace_func と同様の機能をオブジェクト指向的な API で 提供するクラスです。
...Kernel.#set_trace_func と同様の機能をオブジェクト指向的な API で
提供するクラスです。
//emlist[例:例外に関する情報を収集する][ruby]{
trace = TracePoint.new(:raise) do |tp|
p [tp.lineno, tp.event, tp.raised_exception]
end
# => #<TracePoint:0x007f786a452448... -
TracePoint
# defined _ class -> Class | module (24.0) -
メソッドを定義したクラスかモジュールを返します。
...Kernel.#set_trace_func の 6 番目のブロックパ
ラメータは特異クラスではなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#se...