るりまサーチ

最速Rubyリファレンスマニュアル検索!
2356件ヒット [1-100件を表示] (0.151秒)
トップページ > クエリ:I[x] > クエリ:IN[x] > クエリ:trace[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. _builtin i

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

TracePoint#binding -> Binding (33812.0)

発生したイベントによって生成された Binding オブジェクトを返します。

...発生したイベントによって生成された Binding オブジェクトを返します。


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

TracePoint#binding -> Binding | nil (33812.0)

発生したイベントによって生成された Binding オブジェクトを返します。

...れた Binding オブジェクトを返します。

C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。

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

IRB::Context#back_trace_limit -> Integer (32307.0)

エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。

...エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。

デフォルト値は 16 です。

@see IRB::Context#back_trace_limit=...

IRB::Frame#trace_func(event, file, line, id, binding) -> Binding (29701.0)

ライブラリ内部で使用します。

ライブラリ内部で使用します。

TracePoint.trace(*events) {|obj| ... } -> TracePoint (27419.0)

新しい TracePoint オブジェクトを作成して自動的にトレースを開始し ます。TracePoint.new のコンビニエンスメソッドです。

...新しい TracePoint オブジェクトを作成して自動的にトレースを開始し
ます。TracePoint.new のコンビニエンスメソッドです。

@param events トレースするイベントを String か Symbol で任
意の数指定します。指定できる値に...
...ついては
Trace
Point.new を参照してください。

//emlist[例][ruby]{
trace
= TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] }
# => #<TracePoint:0x007f786a452448>

trace
.enabled? # => true
//}

@raise ThreadError ブロックを指定しなかった場合に発生し...

絞り込み条件を変える

TracePoint#inspect -> String (21412.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#lineno -> Integer (21412.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
//}...

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

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

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

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

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

TracePoint#defined_class -> Class | module (21230.0)

メソッドを定義したクラスかモジュールを返します。

...す。

//emlist[例][ruby]{
class C; def foo; end; end
trace
= TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}

メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。

//emlist[例][ruby]...
...oo; end; end
class C; include M; end;
trace
= TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}

[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、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.#set_trace_func と TracePoint の上記の差分に注意して
ください。

@s...

Matrix#trace -> Integer | Float | Rational | Complex (18335.0)

トレース (trace) を返します。

...トレース (trace) を返します。

行列のトレース (trace) とは、対角要素の和です。

//emlist[例][ruby]{
require 'matrix'
Matrix[[7,6], [3,9]].trace # => 16
//}

trace
は正方行列でのみ定義されます。

@raise ExceptionForMatrix::ErrDimensionMismatch 行列が...

絞り込み条件を変える

Net::HTTP#trace(path, initheader = nil) -> Net::HTTPResponse (18323.0)

サーバの path に TRACE リクエストを ヘッダを initheader として送ります。

...サーバの path に TRACE リクエストを
ヘッダを initheader として送ります。

レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「...
...文字列=>文字列」の
ハッシュで与えます。

@see Net::HTTP::Trace...
<< 1 2 3 ... > >>